mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Use theme for styling item libraries.
This commit is contained in:
parent
8a003dbfa8
commit
52f17842c8
@ -1,5 +1,7 @@
|
||||
#include "yacreader_library_item_widget.h"
|
||||
|
||||
#include "theme.h"
|
||||
|
||||
#include <QHBoxLayout>
|
||||
#include <QLabel>
|
||||
#include <QToolButton>
|
||||
@ -50,10 +52,8 @@ YACReaderLibraryItemWidget::YACReaderLibraryItemWidget(QString n /*ame*/, QStrin
|
||||
mainLayout->addWidget(down);*/
|
||||
|
||||
setLayout(mainLayout);
|
||||
#ifndef Q_OS_MAC
|
||||
QString styleSheet = "background-color:transparent; color:#DDDFDF;";
|
||||
setStyleSheet(styleSheet);
|
||||
#endif
|
||||
|
||||
setStyleSheet(Theme::currentTheme().itemLibraryNoSelectedStyleSheet);
|
||||
|
||||
QString iconStyleSheet = "QLabel {padding:0 0 0 24px; margin:0px}";
|
||||
icon->setStyleSheet(iconStyleSheet);
|
||||
@ -109,6 +109,7 @@ bool YACReaderLibraryItemWidget::eventFilter(QObject *object, QEvent *event){
|
||||
|
||||
void YACReaderLibraryItemWidget::deselect()
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
QString styleSheet = "background-color:transparent;";
|
||||
@ -117,6 +118,9 @@ void YACReaderLibraryItemWidget::deselect()
|
||||
QString styleSheet = "background-color:transparent; color:#DDDFDF;";
|
||||
setStyleSheet(styleSheet);
|
||||
#endif
|
||||
=======
|
||||
setStyleSheet(Theme::currentTheme().itemLibraryNoSelectedStyleSheet);
|
||||
>>>>>>> 1611385... Use theme for styling item libraries.
|
||||
|
||||
QPixmap iconPixmap(":/images/sidebar/libraryIcon.png");
|
||||
icon->setPixmap(iconPixmap);
|
||||
@ -130,6 +134,7 @@ void YACReaderLibraryItemWidget::deselect()
|
||||
|
||||
void YACReaderLibraryItemWidget::select()
|
||||
{
|
||||
<<<<<<< HEAD
|
||||
#ifdef Q_OS_MAC
|
||||
//QString styleSheet ="color: white; background-color:qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #6BAFE4, stop: 1 #3984D2); border-top: 2px solid qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, stop: 0 #5EA3DF, stop: 1 #73B8EA); border-left:none;border-right:none;border-bottom:1px solid #3577C2;";
|
||||
QString styleSheet = "color: white; background-color:#91c4f4; border-bottom:1px solid #91c4f4;";
|
||||
@ -137,6 +142,9 @@ void YACReaderLibraryItemWidget::select()
|
||||
QString styleSheet = "color: white; background-color:#2E2E2E; font-weight:bold;";
|
||||
#endif
|
||||
setStyleSheet(styleSheet);
|
||||
=======
|
||||
setStyleSheet(Theme::currentTheme().itemLibrarySelectedStyleSheet);
|
||||
>>>>>>> 1611385... Use theme for styling item libraries.
|
||||
|
||||
options->setHidden(false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user