1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 13:47:26 +02:00

* Fixed TWK-107: paint dividers between toolbar, central widget and status bar.

This commit is contained in:
Christian Muehlhaeuser
2011-08-13 04:15:58 +02:00
parent 5e6751dc64
commit aa68229ac6
4 changed files with 49 additions and 7 deletions

View File

@@ -80,6 +80,11 @@ ProxyStyle::drawControl( ControlElement ce, const QStyleOption* opt, QPainter* p
p->setPen( QColor( 0x8c, 0x8c, 0x8c ) ); p->setPen( QColor( 0x8c, 0x8c, 0x8c ) );
p->drawLine( opt->rect.topLeft(), opt->rect.bottomRight() ); p->drawLine( opt->rect.topLeft(), opt->rect.bottomRight() );
} }
else
{
p->setPen( QColor( 0xff, 0xff, 0xff ) );
p->drawLine( opt->rect.topLeft(), opt->rect.bottomRight() );
}
} }
else else
QProxyStyle::drawControl( ce, opt, p, w ); QProxyStyle::drawControl( ce, opt, p, w );

View File

@@ -80,11 +80,6 @@ ViewManager::ViewManager( QObject* parent )
m_infobar = new InfoBar(); m_infobar = new InfoBar();
m_stack = new QStackedWidget(); 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 = new AnimatedSplitter();
m_splitter->setOrientation( Qt::Vertical ); m_splitter->setOrientation( Qt::Vertical );
m_splitter->setChildrenCollapsible( false ); m_splitter->setChildrenCollapsible( false );
@@ -101,7 +96,6 @@ ViewManager::ViewManager( QObject* parent )
m_widget->layout()->addWidget( m_infobar ); m_widget->layout()->addWidget( m_infobar );
m_widget->layout()->addWidget( m_topbar ); m_widget->layout()->addWidget( m_topbar );
m_widget->layout()->addWidget( line );
m_widget->layout()->addWidget( m_splitter ); m_widget->layout()->addWidget( m_splitter );
m_superCollectionView = new ArtistView(); m_superCollectionView = new ArtistView();

View File

@@ -93,6 +93,7 @@ TomahawkWindow::TomahawkWindow( QWidget* parent )
ui->centralWidget->setContentsMargins( 0, 0, 0, 0 ); ui->centralWidget->setContentsMargins( 0, 0, 0, 0 );
ui->centralWidget->layout()->setContentsMargins( 0, 0, 0, 0 ); ui->centralWidget->layout()->setContentsMargins( 0, 0, 0, 0 );
ui->centralWidget->layout()->setMargin( 0 ); ui->centralWidget->layout()->setMargin( 0 );
ui->centralWidget->layout()->setSpacing( 0 );
setupSideBar(); setupSideBar();
setupToolBar(); setupToolBar();
@@ -174,6 +175,16 @@ TomahawkWindow::applyPlatformTweaks()
#ifdef Q_WS_MAC #ifdef Q_WS_MAC
setUnifiedTitleAndToolBarOnMac( true ); setUnifiedTitleAndToolBarOnMac( true );
#endif #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
} }

View File

@@ -15,6 +15,22 @@
</property> </property>
<widget class="QWidget" name="centralWidget"> <widget class="QWidget" name="centralWidget">
<layout class="QVBoxLayout" name="verticalLayout"> <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> <item>
<widget class="QSplitter" name="splitter"> <widget class="QSplitter" name="splitter">
<property name="orientation"> <property name="orientation">
@@ -27,6 +43,22 @@
<widget class="QWidget" name="playlistWidget" native="true"/> <widget class="QWidget" name="playlistWidget" native="true"/>
</widget> </widget>
</item> </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> </layout>
</widget> </widget>
<widget class="QMenuBar" name="menuBar"> <widget class="QMenuBar" name="menuBar">
@@ -35,7 +67,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>1000</width> <width>1000</width>
<height>22</height> <height>20</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menuSettings"> <widget class="QMenu" name="menuSettings">