source: src/gui/eventdialog.cpp @ 1fe2f21

qt5
Last change on this file since 1fe2f21 was 1fe2f21, checked in by pavelpa <pavelpa@…>, 13 years ago

changed abstract/description/scrollbars color in eventdialog

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[707cd31]1#include "eventdialog.h"
2
[1fe2f21]3#include <QScrollBar>
[395d6d3]4
[707cd31]5EventDialog::EventDialog(const QModelIndex &aIndex, QWidget *aParent)
6    : QDialog(aParent)
7    , mIndex(aIndex)
8{
9    setupUi(this);
[395d6d3]10
11    abstract->setStyleSheet("background-color : transparent;");
12    description->setStyleSheet("background-color : transparent;");
13
[1fe2f21]14    // use text color from 'title' QLabel
15    QColor color = title->palette().color(QPalette::Active, QPalette::WindowText);
16    QPalette p = abstract->palette();
17    //p.setColor(QPalette::Active, QPalette::Text, Qt::blue);
18    p.setColor(QPalette::Active, QPalette::Text, color);
19    p.setColor(QPalette::Active, QPalette::WindowText, color);
20    abstract->setPalette(p);
21    description->setPalette(p);
22
23    // set scrollbars color
24    QPalette p2 = description->verticalScrollBar()->palette();
25    p2.setColor(QPalette::Active, QPalette::Background, color);
26    //description->verticalScrollBar()->setStyleSheet("background-color : blue;");
27    abstract->verticalScrollBar()->setPalette(p2);
28    description->verticalScrollBar()->setPalette(p2);
29
[707cd31]30    Event *event = static_cast<Event *>(mIndex.internalPointer());
31    title->setText(event->title());
[395d6d3]32    persons->setText(event->persons().join(" and "));
[707cd31]33    abstract->setPlainText(event->abstract());
34    description->setPlainText(event->description());
35}
36
Note: See TracBrowser for help on using the repository browser.