1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

* Added custom scrollbars for testing.

This commit is contained in:
Christian Muehlhaeuser 2012-06-14 07:33:16 +02:00
parent 9bea6b8709
commit c99df9257c
2 changed files with 25 additions and 0 deletions

View File

@ -22,6 +22,7 @@
#include "ui_ArtistInfoWidget.h"
#include <QScrollArea>
#include <QScrollBar>
#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 );
}

View File

@ -22,6 +22,7 @@
#include "ui_TrackInfoWidget.h"
#include <QScrollArea>
#include <QScrollBar>
#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 );