mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
* Added styleScrollBar method to TomahawkUtils.
This commit is contained in:
parent
c99df9257c
commit
d4dff8809a
@ -31,6 +31,7 @@
|
||||
#include <QtGui/QPixmap>
|
||||
#include <QtGui/QPalette>
|
||||
#include <QtGui/QApplication>
|
||||
#include <QtGui/QScrollBar>
|
||||
#include <QtGui/QWidget>
|
||||
#include <QStyleOption>
|
||||
|
||||
@ -441,4 +442,28 @@ prepareStyleOption( QStyleOptionViewItemV4* option, const QModelIndex& index, Pl
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
styleScrollBar( QScrollBar* scrollBar )
|
||||
{
|
||||
scrollBar->setStyleSheet(
|
||||
"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; }"
|
||||
|
||||
"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; }" );
|
||||
}
|
||||
|
||||
} // ns
|
||||
|
@ -35,6 +35,7 @@ class QPixmap;
|
||||
class QLayout;
|
||||
class QPalette;
|
||||
class QRect;
|
||||
class QScrollBar;
|
||||
|
||||
namespace TomahawkUtils
|
||||
{
|
||||
@ -59,7 +60,8 @@ namespace TomahawkUtils
|
||||
DLLEXPORT QPixmap defaultPixmap( ImageType type, ImageMode mode = TomahawkUtils::Original, const QSize& size = QSize( 0, 0 ) );
|
||||
|
||||
DLLEXPORT void prepareStyleOption( QStyleOptionViewItemV4* option, const QModelIndex& index, PlayableItem* item );
|
||||
|
||||
|
||||
DLLEXPORT void styleScrollBar( QScrollBar* scrollBar );
|
||||
}
|
||||
|
||||
#endif // TOMAHAWKUTILSGUI_H
|
||||
|
Loading…
x
Reference in New Issue
Block a user