From c99df9257cba596a5e02c685133c47576a574a12 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Thu, 14 Jun 2012 07:33:16 +0200 Subject: [PATCH] * Added custom scrollbars for testing. --- .../widgets/infowidgets/ArtistInfoWidget.cpp | 14 ++++++++++++++ .../widgets/infowidgets/TrackInfoWidget.cpp | 11 +++++++++++ 2 files changed, 25 insertions(+) diff --git a/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.cpp b/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.cpp index 8732596c0..918678473 100644 --- a/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.cpp +++ b/src/libtomahawk/widgets/infowidgets/ArtistInfoWidget.cpp @@ -22,6 +22,7 @@ #include "ui_ArtistInfoWidget.h" #include +#include #include "audio/AudioEngine.h" #include "playlist/PlayableModel.h" @@ -127,6 +128,19 @@ ArtistInfoWidget::ArtistInfoWidget( const Tomahawk::artist_ptr& artist, QWidget* setLayout( layout ); TomahawkUtils::unmarginLayout( layout ); + QString scrollBarStyleSheet( + "QScrollBar:horizontal { background-color: transparent; }" + "QScrollBar::handle:horizontal { border-height: 9px; margin-bottom: 6px;" + "border-image: url(" RESPATH "images/scrollbar-horizontal-handle.png) 3 3 3 3 stretch stretch;" + "border-top: 3px transparent; border-bottom: 3px transparent; border-right: 3px transparent; border-left: 3px transparent; }" + "QScrollBar::add-page:horizontal, QScrollBar::sub-page:horizontal { width: 0px; height: 0px; background: none; }" + "QScrollBar::add-line:horizontal, QScrollBar::sub-line:horizontal { width: 0px; height: 0px; background: none; }" + "QScrollBar:left-arrow:horizontal, QScrollBar::right-arrow:horizontal {" + "border: 0px; width: 0px; height: 0px; background: none; background-color: transparent; }" ); + + ui->albums->horizontalScrollBar()->setStyleSheet( scrollBarStyleSheet ); + ui->relatedArtists->horizontalScrollBar()->setStyleSheet( scrollBarStyleSheet ); + load( artist ); } diff --git a/src/libtomahawk/widgets/infowidgets/TrackInfoWidget.cpp b/src/libtomahawk/widgets/infowidgets/TrackInfoWidget.cpp index 3364575b4..87e96e4cd 100644 --- a/src/libtomahawk/widgets/infowidgets/TrackInfoWidget.cpp +++ b/src/libtomahawk/widgets/infowidgets/TrackInfoWidget.cpp @@ -22,6 +22,7 @@ #include "ui_TrackInfoWidget.h" #include +#include #include "ViewManager.h" #include "SourceList.h" @@ -58,6 +59,16 @@ TrackInfoWidget::TrackInfoWidget( const Tomahawk::query_ptr& query, QWidget* par ui->lyricsView->setFrameShape( QFrame::NoFrame ); ui->lyricsView->setAttribute( Qt::WA_MacShowFocusRect, 0 ); + ui->similarTracksView->verticalScrollBar()->setStyleSheet( + "QScrollBar:vertical { background-color: transparent; }" + "QScrollBar::handle:vertical { border-width: 9px; margin-right: 6px;" + "border-image: url(" RESPATH "images/scrollbar-vertical-handle.png) 3 3 3 3 stretch stretch;" + "border-top: 3px transparent; border-bottom: 3px transparent; border-right: 3px transparent; border-left: 3px transparent; }" + "QScrollBar::add-page:vertical, QScrollBar::sub-page:vertical { width: 0px; height: 0px; background: none; }" + "QScrollBar::add-line:vertical, QScrollBar::sub-line:vertical { width: 0px; height: 0px; background: none; }" + "QScrollBar:up-arrow:vertical, QScrollBar::down-arrow:vertical {" + "border: 0px; width: 0px; height: 0px; background: none; background-color: transparent; }" ); + QFont f = font(); f.setBold( true ); f.setPixelSize( 18 );