event dialog changes
authorpavelpa <pavelpa@localhost>
Wed, 20 Jan 2010 19:49:28 +0000 (19:49 +0000)
committerpavelpa <pavelpa@localhost>
Wed, 20 Jan 2010 19:49:28 +0000 (19:49 +0000)
 - changed font/background colors
 - title occupies more lines if it doesn't fit in one line

src/gui/eventdialog.cpp
src/gui/eventdialog.ui

index 9065816..237345f 100644 (file)
@@ -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 "));
index 10a1cb0..5007534 100644 (file)
@@ -5,12 +5,18 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>445</width>
-    <height>298</height>
+    <width>468</width>
+    <height>496</height>
    </rect>
   </property>
+  <property name="sizePolicy" >
+   <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
   <property name="windowTitle" >
-   <string>Dialog</string>
+   <string>Details</string>
   </property>
   <property name="autoFillBackground" >
    <bool>false</bool>
     <layout class="QVBoxLayout" name="verticalLayout" >
      <item>
       <widget class="QLabel" name="title" >
+       <property name="sizePolicy" >
+        <sizepolicy vsizetype="MinimumExpanding" hsizetype="MinimumExpanding" >
+         <horstretch>0</horstretch>
+         <verstretch>0</verstretch>
+        </sizepolicy>
+       </property>
+       <property name="font" >
+        <font>
+         <weight>75</weight>
+         <bold>true</bold>
+        </font>
+       </property>
        <property name="text" >
-        <string>Here goes title</string>
+        <string>Title goes here</string>
+       </property>
+       <property name="wordWrap" >
+        <bool>true</bool>
        </property>
       </widget>
      </item>