From 4e071a3ecbefdf93da25c696b62e421294758b9e Mon Sep 17 00:00:00 2001 From: pavelpa Date: Wed, 20 Jan 2010 19:49:28 +0000 Subject: [PATCH] event dialog changes - changed font/background colors - title occupies more lines if it doesn't fit in one line --- src/gui/eventdialog.cpp | 18 +++++++++--------- src/gui/eventdialog.ui | 29 +++++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 13 deletions(-) diff --git a/src/gui/eventdialog.cpp b/src/gui/eventdialog.cpp index 9065816..237345f 100644 --- a/src/gui/eventdialog.cpp +++ b/src/gui/eventdialog.cpp @@ -11,24 +11,24 @@ EventDialog::EventDialog(const int &aEventId, QWidget *aParent) const int confId = 1; Event event = Event::getById(aEventId,confId); - abstract->setStyleSheet("background-color : transparent;"); - description->setStyleSheet("background-color : transparent;"); + //abstract->setStyleSheet("background-color : transparent;"); + //description->setStyleSheet("background-color : transparent;"); // use text color from 'title' QLabel QColor color = title->palette().color(QPalette::Active, QPalette::WindowText); + QColor bkgrColor = this->palette().color(QPalette::Active, QPalette::Background); QPalette p = abstract->palette(); - //p.setColor(QPalette::Active, QPalette::Text, Qt::blue); p.setColor(QPalette::Active, QPalette::Text, color); - p.setColor(QPalette::Active, QPalette::WindowText, color); + p.setColor(QPalette::Active, QPalette::Base, bkgrColor); abstract->setPalette(p); description->setPalette(p); // set scrollbars color - QPalette p2 = description->verticalScrollBar()->palette(); - p2.setColor(QPalette::Active, QPalette::Background, color); - //description->verticalScrollBar()->setStyleSheet("background-color : blue;"); - abstract->verticalScrollBar()->setPalette(p2); - description->verticalScrollBar()->setPalette(p2); + //QPalette p2 = description->verticalScrollBar()->palette(); + //p2.setColor(QPalette::Active, QPalette::Background, color); + ////description->verticalScrollBar()->setStyleSheet("background-color : blue;"); + //abstract->verticalScrollBar()->setPalette(p2); + //description->verticalScrollBar()->setPalette(p2); title->setText(event.title()); persons->setText(event.persons().join(" and ")); diff --git a/src/gui/eventdialog.ui b/src/gui/eventdialog.ui index 10a1cb0..5007534 100644 --- a/src/gui/eventdialog.ui +++ b/src/gui/eventdialog.ui @@ -5,12 +5,18 @@ 0 0 - 445 - 298 + 468 + 496 + + + 0 + 0 + + - Dialog + Details false @@ -20,8 +26,23 @@ + + + 0 + 0 + + + + + 75 + true + + - Here goes title + Title goes here + + + true -- 2.39.5