source: src/gui/eventdialog.cpp @ 4e071a3

qt5
Last change on this file since 4e071a3 was 4e071a3, checked in by pavelpa <pavelpa@…>, 12 years ago

event dialog changes

  • changed font/background colors
  • title occupies more lines if it doesn't fit in one line
  • Property mode set to 100644
File size: 1.3 KB
Line 
1#include "eventdialog.h"
2
3#include <QScrollBar>
4
5EventDialog::EventDialog(const int &aEventId, QWidget *aParent)
6    : QDialog(aParent)
7    , mEventId(aEventId)
8{
9    setupUi(this);
10
11    const int confId = 1;
12    Event event = Event::getById(aEventId,confId);
13
14    //abstract->setStyleSheet("background-color : transparent;");
15    //description->setStyleSheet("background-color : transparent;");
16
17    // use text color from 'title' QLabel
18    QColor color = title->palette().color(QPalette::Active, QPalette::WindowText);
19    QColor bkgrColor = this->palette().color(QPalette::Active, QPalette::Background);
20    QPalette p = abstract->palette();
21    p.setColor(QPalette::Active, QPalette::Text, color);
22    p.setColor(QPalette::Active, QPalette::Base, bkgrColor);
23    abstract->setPalette(p);
24    description->setPalette(p);
25
26    // set scrollbars color
27    //QPalette p2 = description->verticalScrollBar()->palette();
28    //p2.setColor(QPalette::Active, QPalette::Background, color);
29    ////description->verticalScrollBar()->setStyleSheet("background-color : blue;");
30    //abstract->verticalScrollBar()->setPalette(p2);
31    //description->verticalScrollBar()->setPalette(p2);
32
33    title->setText(event.title());
34    persons->setText(event.persons().join(" and "));
35    abstract->setPlainText(event.abstract());
36    description->setPlainText(event.description());
37}
38
Note: See TracBrowser for help on using the repository browser.