From aa68229ac69d4aa64c774e11aacb5d17fc789afa Mon Sep 17 00:00:00 2001
From: Christian Muehlhaeuser <muesli@gmail.com>
Date: Sat, 13 Aug 2011 04:15:58 +0200
Subject: [PATCH] * Fixed TWK-107: paint dividers between toolbar, central
 widget and status bar.

---
 src/libtomahawk/utils/proxystyle.cpp |  5 ++++
 src/libtomahawk/viewmanager.cpp      |  6 -----
 src/tomahawkwindow.cpp               | 11 +++++++++
 src/tomahawkwindow.ui                | 34 +++++++++++++++++++++++++++-
 4 files changed, 49 insertions(+), 7 deletions(-)

diff --git a/src/libtomahawk/utils/proxystyle.cpp b/src/libtomahawk/utils/proxystyle.cpp
index 1e906f0f6..cba2b80ac 100644
--- a/src/libtomahawk/utils/proxystyle.cpp
+++ b/src/libtomahawk/utils/proxystyle.cpp
@@ -80,6 +80,11 @@ ProxyStyle::drawControl( ControlElement ce, const QStyleOption* opt, QPainter* p
             p->setPen( QColor( 0x8c, 0x8c, 0x8c ) );
             p->drawLine( opt->rect.topLeft(), opt->rect.bottomRight() );
         }
+        else
+        {
+            p->setPen( QColor( 0xff, 0xff, 0xff ) );
+            p->drawLine( opt->rect.topLeft(), opt->rect.bottomRight() );
+        }
     }
     else
         QProxyStyle::drawControl( ce, opt, p, w );
diff --git a/src/libtomahawk/viewmanager.cpp b/src/libtomahawk/viewmanager.cpp
index b50a6ada9..6d990ebf3 100644
--- a/src/libtomahawk/viewmanager.cpp
+++ b/src/libtomahawk/viewmanager.cpp
@@ -80,11 +80,6 @@ ViewManager::ViewManager( QObject* parent )
     m_infobar = new InfoBar();
     m_stack = new QStackedWidget();
 
-    QFrame* line = new QFrame();
-    line->setFrameStyle( QFrame::HLine );
-    line->setStyleSheet( "border: 1px solid gray;" );
-    line->setMaximumHeight( 1 );
-
     m_splitter = new AnimatedSplitter();
     m_splitter->setOrientation( Qt::Vertical );
     m_splitter->setChildrenCollapsible( false );
@@ -101,7 +96,6 @@ ViewManager::ViewManager( QObject* parent )
 
     m_widget->layout()->addWidget( m_infobar );
     m_widget->layout()->addWidget( m_topbar );
-    m_widget->layout()->addWidget( line );
     m_widget->layout()->addWidget( m_splitter );
 
     m_superCollectionView = new ArtistView();
diff --git a/src/tomahawkwindow.cpp b/src/tomahawkwindow.cpp
index c6e7fcc7b..13dba067d 100644
--- a/src/tomahawkwindow.cpp
+++ b/src/tomahawkwindow.cpp
@@ -93,6 +93,7 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
     ui->centralWidget->setContentsMargins( 0, 0, 0, 0 );
     ui->centralWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
     ui->centralWidget->layout()->setMargin( 0 );
+    ui->centralWidget->layout()->setSpacing( 0 );
 
     setupSideBar();
     setupToolBar();
@@ -174,6 +175,16 @@ TomahawkWindow::applyPlatformTweaks()
 #ifdef Q_WS_MAC
     setUnifiedTitleAndToolBarOnMac( true );
 #endif
+
+#ifdef Q_OS_MAC
+    ui->hline1->setMaximumHeight( 0 );
+    ui->hline2->setMaximumHeight( 0 );
+    ui->hline1->hide();
+    ui->hline2->hide();
+#else
+    ui->hline1->setStyleSheet( "border: 1px solid gray;" );
+    ui->hline2->setStyleSheet( "border: 1px solid gray;" );
+#endif
 }
 
 
diff --git a/src/tomahawkwindow.ui b/src/tomahawkwindow.ui
index dad448a42..c9fde85c0 100644
--- a/src/tomahawkwindow.ui
+++ b/src/tomahawkwindow.ui
@@ -15,6 +15,22 @@
   </property>
   <widget class="QWidget" name="centralWidget">
    <layout class="QVBoxLayout" name="verticalLayout">
+    <item>
+     <widget class="QFrame" name="hline1">
+      <property name="maximumSize">
+       <size>
+        <width>16777215</width>
+        <height>1</height>
+       </size>
+      </property>
+      <property name="frameShape">
+       <enum>QFrame::HLine</enum>
+      </property>
+      <property name="frameShadow">
+       <enum>QFrame::Raised</enum>
+      </property>
+     </widget>
+    </item>
     <item>
      <widget class="QSplitter" name="splitter">
       <property name="orientation">
@@ -27,6 +43,22 @@
       <widget class="QWidget" name="playlistWidget" native="true"/>
      </widget>
     </item>
+    <item>
+     <widget class="QFrame" name="hline2">
+      <property name="maximumSize">
+       <size>
+        <width>16777215</width>
+        <height>1</height>
+       </size>
+      </property>
+      <property name="frameShape">
+       <enum>QFrame::HLine</enum>
+      </property>
+      <property name="frameShadow">
+       <enum>QFrame::Raised</enum>
+      </property>
+     </widget>
+    </item>
    </layout>
   </widget>
   <widget class="QMenuBar" name="menuBar">
@@ -35,7 +67,7 @@
      <x>0</x>
      <y>0</y>
      <width>1000</width>
-     <height>22</height>
+     <height>20</height>
     </rect>
    </property>
    <widget class="QMenu" name="menuSettings">