Set the list with buttons in MainWindow and friend list in FriendsDialog to fixed when resizing the window.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7749 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2014-12-12 19:44:45 +00:00
parent a8b08c9957
commit d87778172e
3 changed files with 470 additions and 479 deletions

View File

@ -191,6 +191,8 @@ FriendsDialog::FriendsDialog(QWidget *parent)
ui.hashBox->setAutoHide(true);
/* Set initial size the splitter */
ui.splitter->setStretchFactor(0, 0);
ui.splitter->setStretchFactor(1, 1);
QList<int> sizes;
sizes << height() << 100; // Qt calculates the right sizes
ui.splitter_2->setSizes(sizes);

View File

@ -206,22 +206,10 @@
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>16777215</height>
</size>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="layoutWidget_1">
<layout class="QGridLayout" name="tabLayout">
<property name="verticalSpacing">
<number>1</number>
</property>
<item row="0" column="0">
<widget class="ChatTabWidget" name="tabWidget">
<property name="currentIndex">
<number>0</number>
@ -699,9 +687,6 @@
</layout>
</widget>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>

View File

@ -226,6 +226,10 @@ MainWindow::MainWindow(QWidget* parent, Qt::WindowFlags flags)
//ui->stackPages->setCurrentIndex(Settings->getLastPageInMainWindow());
setNewPage(Settings->getLastPageInMainWindow());
ui->splitter->setStretchFactor(0, 0);
ui->splitter->setStretchFactor(1, 1);
/* Load listWidget postion */
QByteArray state = Settings->valueFromGroup("MainWindow", "SplitterState", QByteArray()).toByteArray();
if (!state.isEmpty()) ui->splitter->restoreState(state);