summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2018-05-09 13:23:40 (GMT)
committerTobias Markmann <tm@ayena.de>2018-05-09 15:44:38 (GMT)
commit8fab33012e5ac7c03ab00ec30118dcb2c5218051 (patch)
treeb9288b404ad40f0759c05848538b4a89bd51af39
parentb616c9986a45b5090f23e2cb4b561eda044f676b (diff)
downloadswift-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
-rw-r--r--Swift/QtUI/QtChatWindow.cpp4
-rw-r--r--Swift/QtUI/QtMainWindow.cpp4
-rw-r--r--Swift/QtUI/QtSingleWindow.cpp2
-rw-r--r--Swift/QtUI/QtWebKitChatView.cpp2
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
@@ -115,2 +115,5 @@ QtChatWindow::QtChatWindow(const QString& contact, QtChatTheme* theme, UIEventSt
}
+ // 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_);
@@ -358,2 +361,3 @@ void QtChatWindow::handleChangeSplitterState(QByteArray state) {
#endif
+ logRosterSplitter_->setChildrenCollapsible(false);
}
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
@@ -80,2 +80,6 @@ QtMainWindow::QtMainWindow(Chattables& chattables, SettingsProvider* settings, U
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);
}
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
@@ -26,3 +26,3 @@ QtSingleWindow::QtSingleWindow(QtSettingsProvider* settings) : QSplitter() {
restoreSplitters();
-
+ setChildrenCollapsible(false);
#ifdef SWIFTEN_PLATFORM_MACOSX
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
@@ -13,5 +13,5 @@
#include <QFile>
+#include <QFileDevice>
#include <QFileDialog>
#include <QFileInfo>
-#include <QFileDevice>
#include <QInputDialog>