summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Markmann <tm@ayena.de>2018-05-04 11:31:10 (GMT)
committerKevin Smith <kevin.smith@isode.com>2018-05-04 11:51:43 (GMT)
commit699eb1459ea478b2a0e20d6867cd6be19f939d6e (patch)
treebf6d4fd672cd9f111a9acd2d22b8195b6ab3a218
parent19eefe66821d26a00d24fbe44aa870309d80ad4b (diff)
downloadswift-699eb1459ea478b2a0e20d6867cd6be19f939d6e.zip
swift-699eb1459ea478b2a0e20d6867cd6be19f939d6e.tar.bz2
Set QSplitter width to 0px on macOS for more native look
Finder, Mail and other applications all use one or zero width splitters. Test-Information: Rebuilt and verified the splitter look more similar to those in Mail and Finder on macOS 10.13.4. Change-Id: I14827bf3e17d73b24f634031c90ff6b062f5611d
-rw-r--r--Swift/QtUI/QtChatWindow.cpp3
-rw-r--r--Swift/QtUI/QtSingleWindow.cpp8
2 files changed, 10 insertions, 1 deletions
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 5981f9c..1f8e7a7 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -353,6 +353,9 @@ QByteArray QtChatWindow::getSplitterState() {
void QtChatWindow::handleChangeSplitterState(QByteArray state) {
logRosterSplitter_->restoreState(state);
+#ifdef SWIFTEN_PLATFORM_MACOSX
+ logRosterSplitter_->setHandleWidth(0);
+#endif
}
void QtChatWindow::handleSplitterMoved(int, int) {
diff --git a/Swift/QtUI/QtSingleWindow.cpp b/Swift/QtUI/QtSingleWindow.cpp
index 1fba497..5956172 100644
--- a/Swift/QtUI/QtSingleWindow.cpp
+++ b/Swift/QtUI/QtSingleWindow.cpp
@@ -1,11 +1,13 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2018 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
#include <Swift/QtUI/QtSingleWindow.h>
+#include <Swiften/Base/Platform.h>
+
#include <Swift/QtUI/QtChatTabs.h>
#include <Swift/QtUI/QtSettingsProvider.h>
@@ -22,6 +24,10 @@ QtSingleWindow::QtSingleWindow(QtSettingsProvider* settings) : QSplitter() {
}
connect(this, SIGNAL(splitterMoved(int, int)), this, SLOT(handleSplitterMoved(int, int)));
restoreSplitters();
+
+#ifdef SWIFTEN_PLATFORM_MACOSX
+ setHandleWidth(0);
+#endif
}
QtSingleWindow::~QtSingleWindow() {