Fixed layout problem (vertical scrollbar) in ChannelFeed.

Indent text of the channel message and set it to selectable.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4406 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-07-07 22:01:30 +00:00
parent d64b714982
commit 5e0e244b8a
3 changed files with 70 additions and 95 deletions

View File

@ -524,71 +524,53 @@ border-image: url(:/images/btn_26_pressed.png) 4;
</widget> </widget>
</item> </item>
<item row="1" column="0"> <item row="1" column="0">
<widget class="QFrame" name="msgFrame"> <widget class="QScrollArea" name="scrollArea">
<property name="styleSheet"> <property name="widgetResizable">
<string notr="true"/> <bool>true</bool>
</property> </property>
<property name="frameShape"> <property name="alignment">
<enum>QFrame::StyledPanel</enum> <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property> </property>
<property name="frameShadow"> <widget class="QWidget" name="scrollAreaWidgetContents">
<enum>QFrame::Raised</enum> <property name="geometry">
</property> <rect>
<layout class="QGridLayout" name="gridLayout_8"> <x>0</x>
<property name="margin"> <y>0</y>
<number>0</number> <width>486</width>
<height>333</height>
</rect>
</property> </property>
<property name="spacing"> <property name="styleSheet">
<number>0</number> <string notr="true">QWidget#scrollAreaWidgetContents{border: none;}</string>
</property> </property>
<item row="0" column="0"> <layout class="QVBoxLayout" name="verticalLayout">
<widget class="QScrollArea" name="scrollArea"> <property name="spacing">
<property name="widgetResizable"> <number>0</number>
<bool>true</bool> </property>
</property> <property name="margin">
<property name="alignment"> <number>0</number>
<set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set> </property>
</property> <item>
<widget class="QWidget" name="scrollAreaWidgetContents"> <layout class="QVBoxLayout" name="verticalLayout_2"/>
<property name="geometry"> </item>
<rect> <item>
<x>0</x> <spacer name="verticalSpacer">
<y>0</y> <property name="orientation">
<width>484</width> <enum>Qt::Vertical</enum>
<height>331</height>
</rect>
</property> </property>
<property name="styleSheet"> <property name="sizeType">
<string notr="true">QWidget#scrollAreaWidgetContents{border: none;}</string> <enum>QSizePolicy::MinimumExpanding</enum>
</property> </property>
<layout class="QVBoxLayout" name="verticalLayout"> <property name="sizeHint" stdset="0">
<property name="spacing"> <size>
<number>0</number> <width>0</width>
</property> <height>0</height>
<property name="margin"> </size>
<number>0</number> </property>
</property> </spacer>
<item> </item>
<layout class="QVBoxLayout" name="verticalLayout_2"/> </layout>
</item> </widget>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>391</width>
<height>266</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
</layout> </layout>

View File

@ -163,7 +163,7 @@ void ChanMsgItem::updateItemStatic()
} }
msgLabel->setText(QString::fromStdWString(cmi.msg)); msgLabel->setText(QString::fromStdWString(cmi.msg));
msgLabel->setVisible(!cmi.msg.empty()); msgWidget->setVisible(!cmi.msg.empty());
QDateTime qtime; QDateTime qtime;
qtime.setTime_t(cmi.ts); qtime.setTime_t(cmi.ts);

View File

@ -97,22 +97,6 @@ border-radius: 10px;}</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Expanding</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>138</width>
<height>1</height>
</size>
</property>
</spacer>
</item>
</layout> </layout>
</item> </item>
<item row="0" column="1"> <item row="0" column="1">
@ -457,28 +441,37 @@ border-radius: 10px;}</string>
</property> </property>
<layout class="QVBoxLayout"> <layout class="QVBoxLayout">
<item> <item>
<widget class="QLabel" name="msgLabel"> <widget class="QWidget" name="msgWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<stylestrategy>PreferAntialias</stylestrategy>
</font>
</property>
<property name="styleSheet"> <property name="styleSheet">
<string notr="true">QLabel#msgLabel{border: 2px solid #238; <string notr="true">QWidget#msgWidget{border: 2px solid #238;
border-radius: 10px;}</string> border-radius: 10px;}</string>
</property> </property>
<property name="text"> <layout class="QVBoxLayout" name="verticalLayout">
<string notr="true"/> <property name="margin">
</property> <number>5</number>
<property name="wordWrap"> </property>
<bool>true</bool> <item>
</property> <widget class="QLabel" name="msgLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="font">
<font>
<stylestrategy>PreferAntialias</stylestrategy>
</font>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="textInteractionFlags">
<set>Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse</set>
</property>
</widget>
</item>
</layout>
</widget> </widget>
</item> </item>
</layout> </layout>