mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-24 14:23:36 -05:00
Removed maximum size of the splitter in ForumsDialog and ChannelFeed.
Save and load the splitter state of the ChannelFeed. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4012 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
42661d6571
commit
e972ddea3e
@ -71,6 +71,11 @@ ChannelFeed::ChannelFeed(QWidget *parent)
|
|||||||
|
|
||||||
mChannelId.clear();
|
mChannelId.clear();
|
||||||
|
|
||||||
|
/* Set initial size the splitter */
|
||||||
|
QList<int> sizes;
|
||||||
|
sizes << 300 << width(); // Qt calculates the right sizes
|
||||||
|
splitter->setSizes(sizes);
|
||||||
|
|
||||||
/* Initialize group tree */
|
/* Initialize group tree */
|
||||||
treeWidget->initDisplayMenu(displayButton);
|
treeWidget->initDisplayMenu(displayButton);
|
||||||
|
|
||||||
@ -109,8 +114,14 @@ void ChannelFeed::processSettings(bool load)
|
|||||||
|
|
||||||
if (load) {
|
if (load) {
|
||||||
// load settings
|
// load settings
|
||||||
|
|
||||||
|
// state of splitter
|
||||||
|
splitter->restoreState(Settings->value("Splitter").toByteArray());
|
||||||
} else {
|
} else {
|
||||||
// save settings
|
// save settings
|
||||||
|
|
||||||
|
// state of splitter
|
||||||
|
Settings->setValue("Splitter", splitter->saveState());
|
||||||
}
|
}
|
||||||
|
|
||||||
treeWidget->processSettings(Settings, load);
|
treeWidget->processSettings(Settings, load);
|
||||||
|
@ -35,30 +35,6 @@
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>240</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="sizeIncrement">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="baseSize">
|
|
||||||
<size>
|
|
||||||
<width>221</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true">QFrame#chanFrame{border: none;}</string>
|
<string notr="true">QFrame#chanFrame{border: none;}</string>
|
||||||
</property>
|
</property>
|
||||||
@ -81,30 +57,19 @@
|
|||||||
<number>0</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
<widget class="GroupTreeWidget" name="treeWidget" native="true"/>
|
<widget class="GroupTreeWidget" name="treeWidget" native="true">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QFrame" name="chheaderframe">
|
<widget class="QFrame" name="chheaderframe">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>220</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>240</width>
|
|
||||||
<height>38</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="baseSize">
|
|
||||||
<size>
|
|
||||||
<width>220</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"> QFrame#chheaderframe{
|
<string notr="true"> QFrame#chheaderframe{
|
||||||
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
||||||
@ -389,14 +354,14 @@ p, li { white-space: pre-wrap; }
|
|||||||
<item row="0" column="3">
|
<item row="0" column="3">
|
||||||
<widget class="QPushButton" name="unsubscribeButton">
|
<widget class="QPushButton" name="unsubscribeButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>26</width>
|
<width>0</width>
|
||||||
<height>26</height>
|
<height>26</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -431,14 +396,14 @@ border-image: url(:/images/btn_26_pressed.png) 4;
|
|||||||
<item row="0" column="2">
|
<item row="0" column="2">
|
||||||
<widget class="QPushButton" name="subscribeButton">
|
<widget class="QPushButton" name="subscribeButton">
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
<horstretch>0</horstretch>
|
<horstretch>0</horstretch>
|
||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>26</width>
|
<width>0</width>
|
||||||
<height>26</height>
|
<height>26</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -495,9 +460,15 @@ border-image: url(:/images/btn_26_pressed.png) 4;
|
|||||||
</item>
|
</item>
|
||||||
<item row="0" column="4">
|
<item row="0" column="4">
|
||||||
<widget class="QToolButton" name="setAllAsReadButton">
|
<widget class="QToolButton" name="setAllAsReadButton">
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy hsizetype="Minimum" vsizetype="Fixed">
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>0</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>26</width>
|
<width>0</width>
|
||||||
<height>26</height>
|
<height>26</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
@ -533,18 +504,6 @@ border-image: url(:/images/btn_26_pressed.png) 4;
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="0">
|
<item row="1" column="0">
|
||||||
<widget class="QFrame" name="msgFrame">
|
<widget class="QFrame" name="msgFrame">
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Expanding">
|
|
||||||
<horstretch>1</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="sizeIncrement">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"/>
|
<string notr="true"/>
|
||||||
</property>
|
</property>
|
||||||
@ -574,7 +533,7 @@ border-image: url(:/images/btn_26_pressed.png) 4;
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>412</width>
|
<width>404</width>
|
||||||
<height>331</height>
|
<height>331</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
@ -150,6 +150,11 @@ ForumsDialog::ForumsDialog(QWidget *parent)
|
|||||||
connect(ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged()));
|
connect(ui.filterPatternLineEdit, SIGNAL(textChanged(const QString &)), this, SLOT(filterRegExpChanged()));
|
||||||
connect(ui.filterColumnComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterColumnChanged()));
|
connect(ui.filterColumnComboBox, SIGNAL(currentIndexChanged(int)), this, SLOT(filterColumnChanged()));
|
||||||
|
|
||||||
|
/* Set initial size the splitter */
|
||||||
|
QList<int> sizes;
|
||||||
|
sizes << 300 << width(); // Qt calculates the right sizes
|
||||||
|
ui.splitter->setSizes(sizes);
|
||||||
|
|
||||||
/* Set own item delegate */
|
/* Set own item delegate */
|
||||||
RSItemDelegate *itemDelegate = new RSItemDelegate(this);
|
RSItemDelegate *itemDelegate = new RSItemDelegate(this);
|
||||||
itemDelegate->removeFocusRect(COLUMN_THREAD_READ);
|
itemDelegate->removeFocusRect(COLUMN_THREAD_READ);
|
||||||
|
@ -518,16 +518,10 @@
|
|||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QFrame" name="frame">
|
<widget class="QFrame" name="frame">
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>300</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="baseSize">
|
<property name="baseSize">
|
||||||
<size>
|
<size>
|
||||||
<width>220</width>
|
<width>300</width>
|
||||||
<height>0</height>
|
<height>300</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
@ -548,24 +542,6 @@
|
|||||||
</property>
|
</property>
|
||||||
<item row="0" column="0">
|
<item row="0" column="0">
|
||||||
<widget class="QFrame" name="chheaderframe">
|
<widget class="QFrame" name="chheaderframe">
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="maximumSize">
|
|
||||||
<size>
|
|
||||||
<width>16777215</width>
|
|
||||||
<height>16777215</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="baseSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="styleSheet">
|
<property name="styleSheet">
|
||||||
<string notr="true"> QFrame#chheaderframe{
|
<string notr="true"> QFrame#chheaderframe{
|
||||||
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1,
|
||||||
@ -739,12 +715,6 @@ p, li { white-space: pre-wrap; }
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="baseSize">
|
|
||||||
<size>
|
|
||||||
<width>300</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>9</pointsize>
|
<pointsize>9</pointsize>
|
||||||
|
@ -190,24 +190,6 @@ border-image: url(:/images/closepressed.png)
|
|||||||
<verstretch>0</verstretch>
|
<verstretch>0</verstretch>
|
||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="sizeIncrement">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="baseSize">
|
|
||||||
<size>
|
|
||||||
<width>300</width>
|
|
||||||
<height>0</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="font">
|
<property name="font">
|
||||||
<font>
|
<font>
|
||||||
<pointsize>9</pointsize>
|
<pointsize>9</pointsize>
|
||||||
@ -237,6 +219,11 @@ border-image: url(:/images/closepressed.png)
|
|||||||
<attribute name="headerStretchLastSection">
|
<attribute name="headerStretchLastSection">
|
||||||
<bool>false</bool>
|
<bool>false</bool>
|
||||||
</attribute>
|
</attribute>
|
||||||
|
<column>
|
||||||
|
<property name="text">
|
||||||
|
<string notr="true">1</string>
|
||||||
|
</property>
|
||||||
|
</column>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
Loading…
Reference in New Issue
Block a user