From 699eb1459ea478b2a0e20d6867cd6be19f939d6e Mon Sep 17 00:00:00 2001
From: Tobias Markmann <tm@ayena.de>
Date: Fri, 4 May 2018 13:31:10 +0200
Subject: 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

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() {
-- 
cgit v0.10.2-6-g49f6