From 52f17842c8b7be7ef51e5ba5d7469e2d5800f5ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Mon, 10 Sep 2018 11:24:20 +0200 Subject: [PATCH] Use theme for styling item libraries. --- custom_widgets/yacreader_library_item_widget.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/custom_widgets/yacreader_library_item_widget.cpp b/custom_widgets/yacreader_library_item_widget.cpp index 5f27f017..849678f1 100644 --- a/custom_widgets/yacreader_library_item_widget.cpp +++ b/custom_widgets/yacreader_library_item_widget.cpp @@ -1,5 +1,7 @@ #include "yacreader_library_item_widget.h" +#include "theme.h" + #include #include #include @@ -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);