source: src/gui/eventdialog.cpp @ 926f106

qt5
Last change on this file since 926f106 was 4e071a3, checked in by pavelpa <pavelpa@…>, 13 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
RevLine 
[707cd31]1#include "eventdialog.h"
2
[1fe2f21]3#include <QScrollBar>
[395d6d3]4
[d4a8bbf]5EventDialog::EventDialog(const int &aEventId, QWidget *aParent)
[707cd31]6    : QDialog(aParent)
[d4a8bbf]7    , mEventId(aEventId)
[707cd31]8{
9    setupUi(this);
[395d6d3]10
[d4a8bbf]11    const int confId = 1;
12    Event event = Event::getById(aEventId,confId);
13
[4e071a3]14    //abstract->setStyleSheet("background-color : transparent;");
15    //description->setStyleSheet("background-color : transparent;");
[395d6d3]16
[1fe2f21]17    // use text color from 'title' QLabel
18    QColor color = title->palette().color(QPalette::Active, QPalette::WindowText);
[4e071a3]19    QColor bkgrColor = this->palette().color(QPalette::Active, QPalette::Background);
[1fe2f21]20    QPalette p = abstract->palette();
21    p.setColor(QPalette::Active, QPalette::Text, color);
[4e071a3]22    p.setColor(QPalette::Active, QPalette::Base, bkgrColor);
[1fe2f21]23    abstract->setPalette(p);
24    description->setPalette(p);
25
26    // set scrollbars color
[4e071a3]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);
[1fe2f21]32
[d4a8bbf]33    title->setText(event.title());
34    persons->setText(event.persons().join(" and "));
35    abstract->setPlainText(event.abstract());
36    description->setPlainText(event.description());
[707cd31]37}
38
Note: See TracBrowser for help on using the repository browser.