Merge pull request #2148 from defnax/ui-fix-2

GUI fixes
This commit is contained in:
csoler 2020-12-09 23:03:29 +01:00 committed by GitHub
commit a8ca7a559f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 14 deletions

View file

@ -35,6 +35,7 @@
#include "gui/MainWindow.h" #include "gui/MainWindow.h"
#include "gui/Identity/IdDialog.h" #include "gui/Identity/IdDialog.h"
#include "PhotoView.h" #include "PhotoView.h"
#include "gui/Posted/PostedDialog.h"
#include "ui_PostedItem.h" #include "ui_PostedItem.h"
#include <retroshare/rsposted.h> #include <retroshare/rsposted.h>
@ -266,14 +267,14 @@ void BasePostedItem::loadComments()
if (mFeedHolder) if (mFeedHolder)
{ {
QString title = QString::fromUtf8(mPost.mMeta.mMsgName.c_str()); /* window will destroy itself! */
PostedDialog *postedDialog = dynamic_cast<PostedDialog*>(MainWindow::getPage(MainWindow::Posted));
#warning (csoler) Posted item versions not handled yet. When it is the case, start here. if (!postedDialog)
return ;
QVector<RsGxsMessageId> post_versions ; MainWindow::showWindow(MainWindow::Posted);
post_versions.push_back(mPost.mMeta.mMsgId) ; postedDialog->navigate(mPost.mMeta.mGroupId, mPost.mMeta.mMsgId) ;
mFeedHolder->openComments(0, mPost.mMeta.mGroupId, post_versions,mPost.mMeta.mMsgId, title);
} }
} }
void BasePostedItem::readToggled(bool checked) void BasePostedItem::readToggled(bool checked)
@ -740,4 +741,5 @@ void PostedItem::toggleNotes()
ui->frame_notes->hide(); ui->frame_notes->hide();
} }
emit sizeChanged(this);
} }

View file

@ -611,6 +611,9 @@
<height>600</height> <height>600</height>
</size> </size>
</property> </property>
<property name="autoFillBackground">
<bool>true</bool>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::StyledPanel</enum> <enum>QFrame::StyledPanel</enum>
</property> </property>
@ -662,6 +665,9 @@
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<widget class="QFrame" name="frame_notes"> <widget class="QFrame" name="frame_notes">
<property name="autoFillBackground">
<bool>true</bool>
</property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::Box</enum>
</property> </property>
@ -686,6 +692,9 @@
</property> </property>
<item row="0" column="0" colspan="2"> <item row="0" column="0" colspan="2">
<widget class="QLabel" name="notes"> <widget class="QLabel" name="notes">
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="text"> <property name="text">
<string/> <string/>
</property> </property>

View file

@ -10,6 +10,9 @@
<height>262</height> <height>262</height>
</rect> </rect>
</property> </property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="PeerItemGLayout"> <layout class="QGridLayout" name="PeerItemGLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>1</number> <number>1</number>
@ -32,7 +35,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>false</bool> <bool>true</bool>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::Box</enum>
@ -494,7 +497,7 @@
</layout> </layout>
<action name="actionNew_Message"> <action name="actionNew_Message">
<property name="icon"> <property name="icon">
<iconset resource="../images.qrc"> <iconset>
<normaloff>:/images/mail_send.png</normaloff>:/images/mail_send.png</iconset> <normaloff>:/images/mail_send.png</normaloff>:/images/mail_send.png</iconset>
</property> </property>
<property name="text"> <property name="text">

View file

@ -6,8 +6,8 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1196</width> <width>1015</width>
<height>491</height> <height>246</height>
</rect> </rect>
</property> </property>
<layout class="QGridLayout"> <layout class="QGridLayout">
@ -32,7 +32,7 @@
</sizepolicy> </sizepolicy>
</property> </property>
<property name="autoFillBackground"> <property name="autoFillBackground">
<bool>false</bool> <bool>true</bool>
</property> </property>
<property name="frameShape"> <property name="frameShape">
<enum>QFrame::Box</enum> <enum>QFrame::Box</enum>
@ -165,6 +165,9 @@
</item> </item>
<item row="1" column="1" colspan="2"> <item row="1" column="1" colspan="2">
<layout class="QHBoxLayout" name="horizontalLayout_3"> <layout class="QHBoxLayout" name="horizontalLayout_3">
<property name="spacing">
<number>6</number>
</property>
<item> <item>
<widget class="QToolButton" name="friendRequesttoolButton"> <widget class="QToolButton" name="friendRequesttoolButton">
<property name="focusPolicy"> <property name="focusPolicy">
@ -277,7 +280,7 @@
<string>Start Chat</string> <string>Start Chat</string>
</property> </property>
<property name="icon"> <property name="icon">
<iconset resource="../images.qrc"> <iconset>
<normaloff>:/images/chat_24.png</normaloff>:/images/chat_24.png</iconset> <normaloff>:/images/chat_24.png</normaloff>:/images/chat_24.png</iconset>
</property> </property>
<property name="toolButtonStyle"> <property name="toolButtonStyle">
@ -556,7 +559,7 @@
</layout> </layout>
<action name="actionNew_Message"> <action name="actionNew_Message">
<property name="icon"> <property name="icon">
<iconset resource="../images.qrc"> <iconset>
<normaloff>:/images/mail_send.png</normaloff>:/images/mail_send.png</iconset> <normaloff>:/images/mail_send.png</normaloff>:/images/mail_send.png</iconset>
</property> </property>
<property name="text"> <property name="text">

View file

@ -6,7 +6,7 @@
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1231</width> <width>701</width>
<height>529</height> <height>529</height>
</rect> </rect>
</property> </property>