diff --git a/src/DiarySidebar.cpp b/src/DiarySidebar.cpp index 3a97846cb..14b95ccc9 100644 --- a/src/DiarySidebar.cpp +++ b/src/DiarySidebar.cpp @@ -202,7 +202,7 @@ GcLabel::paintEvent(QPaintEvent *) if (filtered && !selected && !underMouse()) painter.setPen(GColor(CCALCURRENT)); else { - if (GCColor::isFlat()) { + if (isChrome && GCColor::isFlat()) { if (GCColor::luminance(GColor(CCHROME)) < 127) painter.setPen(QColor(Qt::white)); diff --git a/src/DiarySidebar.h b/src/DiarySidebar.h index 2df05f782..0c1703bf7 100644 --- a/src/DiarySidebar.h +++ b/src/DiarySidebar.h @@ -43,9 +43,11 @@ class GcLabel : public QLabel int xoff, yoff; bool bg, selected, filtered; // bg = highlighted, selected = user selected too bool highlighted; // highlighed uses highlighter color overlay when painting + QColor bgColor; + bool isChrome; public: - GcLabel(const QString & text, QWidget * parent = 0) : QLabel(text, parent), xoff(0), yoff(0), bg(false), selected(false), filtered(false), highlighted(false), bgColor(Qt::lightGray) {} + GcLabel(const QString & text, QWidget * parent = 0) : QLabel(text, parent), xoff(0), yoff(0), bg(false), selected(false), filtered(false), highlighted(false), bgColor(Qt::lightGray), isChrome(false) {} ~GcLabel(){} signals: @@ -54,6 +56,7 @@ signals: public slots: void setYOff(int x) { yoff = x; } void setXOff(int x) { xoff = x; } + void setChrome(bool x) { isChrome = x; } void setBg(bool x) { bg = x; } bool getBg() { return bg; } void setBgColor(QColor bg) { bgColor = bg; } @@ -67,7 +70,6 @@ protected: emit clicked(); } void paintEvent(QPaintEvent *); - QColor bgColor; }; class GcMiniCalendar : public QWidget diff --git a/src/GcSideBarItem.cpp b/src/GcSideBarItem.cpp index 337285272..3682ba11a 100644 --- a/src/GcSideBarItem.cpp +++ b/src/GcSideBarItem.cpp @@ -283,6 +283,7 @@ GcSplitterHandle::init(QString title, Qt::Orientation orientation, titleLabel = new GcLabel(title, this); titleLabel->setXOff(0); + titleLabel->setChrome(true); QFont font; #ifdef Q_OS_MAC