From d87778172e7ce788852353cec54df48b4be78115 Mon Sep 17 00:00:00 2001 From: thunder2 Date: Fri, 12 Dec 2014 19:44:45 +0000 Subject: [PATCH] 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 --- retroshare-gui/src/gui/FriendsDialog.cpp | 2 + retroshare-gui/src/gui/FriendsDialog.ui | 943 +++++++++++------------ retroshare-gui/src/gui/MainWindow.cpp | 4 + 3 files changed, 470 insertions(+), 479 deletions(-) diff --git a/retroshare-gui/src/gui/FriendsDialog.cpp b/retroshare-gui/src/gui/FriendsDialog.cpp index 7b614464e..8fe170766 100644 --- a/retroshare-gui/src/gui/FriendsDialog.cpp +++ b/retroshare-gui/src/gui/FriendsDialog.cpp @@ -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 sizes; sizes << height() << 100; // Qt calculates the right sizes ui.splitter_2->setSizes(sizes); diff --git a/retroshare-gui/src/gui/FriendsDialog.ui b/retroshare-gui/src/gui/FriendsDialog.ui index cbbb34dff..fb5bb8382 100644 --- a/retroshare-gui/src/gui/FriendsDialog.ui +++ b/retroshare-gui/src/gui/FriendsDialog.ui @@ -206,501 +206,486 @@ 0 - - - 16777215 - 16777215 - - - - - - 1 - - - - - 0 - - - true - - - - - :/images/kblogger.png:/images/kblogger.png - - - Broadcast - - - - - - - 16777215 - 38 - - - - QFrame::Box - - - QFrame::Sunken - - + + + 0 + + + true + + + + + :/images/kblogger.png:/images/kblogger.png + + + Broadcast + + + + + + + 16777215 + 38 + + + + QFrame::Box + + + QFrame::Sunken + + - 6 - - - - - - 0 - 0 - - - - - 24 - 24 - - - - - 24 - 24 - - - - Qt::NoFocus - - - - :/images/emoticons/kopete/kopete020.png:/images/emoticons/kopete/kopete020.png - - - - 24 - 24 - - - - true - - - - - - - - 0 - 0 - - - - - 24 - 24 - - - - - 24 - 24 - - - - Qt::NoFocus - - - Bold - - - - :/images/edit-bold.png:/images/edit-bold.png - - - true - - - true - - - - - - - - 0 - 0 - - - - - 24 - 24 - - - - - 24 - 24 - - - - Qt::NoFocus - - - Underline - - - - - - - :/images/edit-underline.png:/images/edit-underline.png - - - true - - - true - - - - - - - - 0 - 0 - - - - - 24 - 24 - - - - - 24 - 24 - - - - Qt::NoFocus - - - Italic - - - - :/images/edit-italic.png:/images/edit-italic.png - - - true - - - true - - - - - - - - 0 - 0 - - - - - 24 - 24 - - - - - 24 - 24 - - - - Qt::NoFocus - - - Font - - - - :/images/fonts.png:/images/fonts.png - - - true - - - - - - - - 0 - 0 - - - - - 24 - 24 - - - - - 24 - 24 - - - - Qt::NoFocus - - - Text Color - - - true - - - - - - - - 28 - 28 - - - - - 28 - 28 - - - - Qt::NoFocus - - - Attach a Picture - - - - :/images/add_image24.png:/images/add_image24.png - - - - 24 - 24 - - - - true - - - - - - - - 0 - 0 - - - - - 26 - 26 - - - - - 26 - 26 - - - - Qt::NoFocus - - - Attach File - - - - :/images/add-share24.png:/images/add-share24.png - - - - 24 - 24 - - - - true - - - - - - - - 0 - 0 - - - - - 24 - 24 - - - - - 24 - 24 - - - - Qt::NoFocus - - - - :/images/configure.png:/images/configure.png - - - - 22 - 22 - - - - QToolButton::InstantPopup - - - true - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 321 - 20 - - - - - - - - Send - - - - - - - - - - Qt::Vertical - - - 5 - - - false - - - - - 0 - 0 - - - - - 0 - 60 - - - - Qt::CustomContextMenu - - - true - - - - - - 0 - - - - - - - - - - - - - 0 - 30 - - - - Qt::CustomContextMenu - - - Messages entered here are sent to all connected friends - - - - - - - - - + 6 + + + - + 0 0 - + + + 24 + 24 + + + + + 24 + 24 + + + + Qt::NoFocus + + + + :/images/emoticons/kopete/kopete020.png:/images/emoticons/kopete/kopete020.png + + + + 24 + 24 + + + true + + + + + 0 + 0 + + + + + 24 + 24 + + + + + 24 + 24 + + + + Qt::NoFocus + + + Bold + + + + :/images/edit-bold.png:/images/edit-bold.png + + + true + + + true + + + + + + + + 0 + 0 + + + + + 24 + 24 + + + + + 24 + 24 + + + + Qt::NoFocus + + + Underline + + + + + + + :/images/edit-underline.png:/images/edit-underline.png + + + true + + + true + + + + + + + + 0 + 0 + + + + + 24 + 24 + + + + + 24 + 24 + + + + Qt::NoFocus + + + Italic + + + + :/images/edit-italic.png:/images/edit-italic.png + + + true + + + true + + + + + + + + 0 + 0 + + + + + 24 + 24 + + + + + 24 + 24 + + + + Qt::NoFocus + + + Font + + + + :/images/fonts.png:/images/fonts.png + + + true + + + + + + + + 0 + 0 + + + + + 24 + 24 + + + + + 24 + 24 + + + + Qt::NoFocus + + + Text Color + + + true + + + + + + + + 28 + 28 + + + + + 28 + 28 + + + + Qt::NoFocus + + + Attach a Picture + + + + :/images/add_image24.png:/images/add_image24.png + + + + 24 + 24 + + + + true + + + + + + + + 0 + 0 + + + + + 26 + 26 + + + + + 26 + 26 + + + + Qt::NoFocus + + + Attach File + + + + :/images/add-share24.png:/images/add-share24.png + + + + 24 + 24 + + + + true + + + + + + + + 0 + 0 + + + + + 24 + 24 + + + + + 24 + 24 + + + + Qt::NoFocus + + + + :/images/configure.png:/images/configure.png + + + + 22 + 22 + + + + QToolButton::InstantPopup + + + true + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 321 + 20 + + + + + + + + Send + + + - - - + + + + + Qt::Vertical + + + 5 + + + false + + + + + 0 + 0 + + + + + 0 + 60 + + + + Qt::CustomContextMenu + + + true + + + + + + 0 + + + + + + + + + + + + + 0 + 30 + + + + Qt::CustomContextMenu + + + Messages entered here are sent to all connected friends + + + + + + + + + + + + 0 + 0 + + + + true + + + + + diff --git a/retroshare-gui/src/gui/MainWindow.cpp b/retroshare-gui/src/gui/MainWindow.cpp index 4de5453c8..4d8eefc63 100644 --- a/retroshare-gui/src/gui/MainWindow.cpp +++ b/retroshare-gui/src/gui/MainWindow.cpp @@ -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);