diff options
author | Tobias Markmann <tm@ayena.de> | 2018-05-09 13:23:40 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2018-05-09 15:44:38 (GMT) |
commit | 8fab33012e5ac7c03ab00ec30118dcb2c5218051 (patch) | |
tree | b9288b404ad40f0759c05848538b4a89bd51af39 /Swift/QtUI | |
parent | b616c9986a45b5090f23e2cb4b561eda044f676b (diff) | |
download | swift-8fab33012e5ac7c03ab00ec30118dcb2c5218051.zip swift-8fab33012e5ac7c03ab00ec30118dcb2c5218051.tar.bz2 |
Remove ability to hide rosters via QSplitter
Previously, you could move the QSplitter slider all to one
side and thereby hide the account and MUC rosters. However,
these splitters can be hard to get back their previous
positions.
Test-Information:
Verified in Swift that you can not hide/collapse the roster
in the UI anymore on macOS 10.13.4.
Change-Id: If6622684feb47e5b4172405fe15c3a90178d7b9d
Diffstat (limited to 'Swift/QtUI')
-rw-r--r-- | Swift/QtUI/QtChatWindow.cpp | 4 | ||||
-rw-r--r-- | Swift/QtUI/QtMainWindow.cpp | 4 | ||||
-rw-r--r-- | Swift/QtUI/QtSingleWindow.cpp | 2 | ||||
-rw-r--r-- | Swift/QtUI/QtWebKitChatView.cpp | 2 |
4 files changed, 10 insertions, 2 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp index e0881d5..231a9b9 100644 --- a/Swift/QtUI/QtChatWindow.cpp +++ b/Swift/QtUI/QtChatWindow.cpp @@ -113,6 +113,9 @@ QtChatWindow::QtChatWindow(const QString& contact, QtChatTheme* theme, UIEventSt else { messageLog_ = new QtWebKitChatView(this, eventStream_, theme, this, settings); // I accept that passing the ChatWindow in so that the view can call the signals is somewhat inelegant, but it saves a lot of boilerplate. This patch is unpleasant enough already. So let's fix this soon (it at least needs fixing by the time history is sorted), but not now. } + // When used with QSplitter and setChildrenCollapsible(false), the following prevents + // this widget to be hidden, i.e. resized to zero width. + messageLog_->setMinimumWidth(20); logRosterSplitter_->addWidget(messageLog_); treeWidget_ = new QtOccupantListWidget(eventStream_, settings_, QtTreeWidget::MessageDisplayJID, this); @@ -356,6 +359,7 @@ void QtChatWindow::handleChangeSplitterState(QByteArray state) { #ifdef SWIFTEN_PLATFORM_MACOSX logRosterSplitter_->setHandleWidth(0); #endif + logRosterSplitter_->setChildrenCollapsible(false); } void QtChatWindow::handleSplitterMoved(int, int) { diff --git a/Swift/QtUI/QtMainWindow.cpp b/Swift/QtUI/QtMainWindow.cpp index cd38259..7eec8d1 100644 --- a/Swift/QtUI/QtMainWindow.cpp +++ b/Swift/QtUI/QtMainWindow.cpp @@ -78,6 +78,10 @@ QtMainWindow::QtMainWindow(Chattables& chattables, SettingsProvider* settings, U overviewScroll->setWidgetResizable(true); overviewScroll->setWidget(chatOverview_); tabs_->addTab(overviewScroll, tr("&All")); + + // When used with QSplitter and setChildrenCollapsible(false), the following prevents + // this widget to be hidden, i.e. resized to zero width. + chatOverview_->setMinimumWidth(20); } contactsTabWidget_ = new QWidget(this); diff --git a/Swift/QtUI/QtSingleWindow.cpp b/Swift/QtUI/QtSingleWindow.cpp index 5956172..2e88968 100644 --- a/Swift/QtUI/QtSingleWindow.cpp +++ b/Swift/QtUI/QtSingleWindow.cpp @@ -24,7 +24,7 @@ QtSingleWindow::QtSingleWindow(QtSettingsProvider* settings) : QSplitter() { } connect(this, SIGNAL(splitterMoved(int, int)), this, SLOT(handleSplitterMoved(int, int))); restoreSplitters(); - + setChildrenCollapsible(false); #ifdef SWIFTEN_PLATFORM_MACOSX setHandleWidth(0); #endif diff --git a/Swift/QtUI/QtWebKitChatView.cpp b/Swift/QtUI/QtWebKitChatView.cpp index 6a7018e..92f0a2c 100644 --- a/Swift/QtUI/QtWebKitChatView.cpp +++ b/Swift/QtUI/QtWebKitChatView.cpp @@ -11,9 +11,9 @@ #include <QDesktopWidget> #include <QEventLoop> #include <QFile> +#include <QFileDevice> #include <QFileDialog> #include <QFileInfo> -#include <QFileDevice> #include <QInputDialog> #include <QKeyEvent> #include <QMessageBox> |