From 59b4a9d85f3cd02e90c8efcecc66f9150f8a61f8 Mon Sep 17 00:00:00 2001 From: Risto Lintinen Date: Thu, 20 Aug 2009 09:34:56 +0300 Subject: [PATCH] Squashed commit of the following: commit 00c18cb215544822964279b5640fcd7fda2a1361 Author: Risto Lintinen Date: Thu Aug 20 09:30:40 2009 +0300 traffic lights fixed --- .../Views/RoomStatusIndicatorWidget.cpp | 11 +++++++++-- src/UserInterface/Views/SettingsView.cpp | 2 ++ src/UserInterface/Views/WeeklyViewWidget.cpp | 4 +++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/src/UserInterface/Views/RoomStatusIndicatorWidget.cpp b/src/UserInterface/Views/RoomStatusIndicatorWidget.cpp index 0295a40..ebe2a90 100644 --- a/src/UserInterface/Views/RoomStatusIndicatorWidget.cpp +++ b/src/UserInterface/Views/RoomStatusIndicatorWidget.cpp @@ -33,7 +33,6 @@ RoomStatusIndicatorWidget::RoomStatusIndicatorWidget(Room *aDefaultRoom, Room::S iDefaultRoomLabel = ToolBox::createLabel(aDefaultRoom->name(), importantTextFont); iDefaultRoomLabel->setAlignment(Qt::AlignHCenter); - iDefaultRoomLabel->setStyleSheet("background-color: transparent"); iDefaultRoomLabel->setHidden( true); // is busy @@ -82,6 +81,12 @@ RoomStatusIndicatorWidget::RoomStatusIndicatorWidget(Room *aDefaultRoom, Room::S statusChanged(aStatus, aUntil); + QPalette palette; + palette.setColor( QPalette::Window, Qt::white ); + palette.setColor( QPalette::WindowText, Qt::darkGray ); + setPalette( palette ); + + setAutoFillBackground( true ); setFocusPolicy(Qt::StrongFocus); setEnabled( true); // enable mouse & key events } @@ -124,7 +129,9 @@ QPalette RoomStatusIndicatorWidget::createPalette(Room::Status aStatus) } QPalette palette; - palette.setBrush(QPalette::Window, brush); + palette.setColor( QPalette::Window, Qt::white ); + palette.setColor( QPalette::WindowText, Qt::darkGray ); + palette.setBrush( QPalette::Window, brush ); return palette; } diff --git a/src/UserInterface/Views/SettingsView.cpp b/src/UserInterface/Views/SettingsView.cpp index 5471b0c..30ab301 100644 --- a/src/UserInterface/Views/SettingsView.cpp +++ b/src/UserInterface/Views/SettingsView.cpp @@ -57,6 +57,8 @@ SettingsView::SettingsView( QWidget *aParent ) : setLayout( mainLayout ); setValues(); + setAutoFillBackground( true ); + // Handle component connections connect( iOkButton, SIGNAL( clicked() ), this, SLOT( handleOkClicked() ) ); connect( iCancelButton, SIGNAL( clicked() ), this, SLOT( handleCancelClicked() ) ); diff --git a/src/UserInterface/Views/WeeklyViewWidget.cpp b/src/UserInterface/Views/WeeklyViewWidget.cpp index 673d91e..643732e 100644 --- a/src/UserInterface/Views/WeeklyViewWidget.cpp +++ b/src/UserInterface/Views/WeeklyViewWidget.cpp @@ -102,9 +102,11 @@ WeeklyViewWidget::WeeklyViewWidget( QDateTime aCurrentDateTime, Configuration *a QPalette palette; palette.setColor( QPalette::Window, Qt::white ); - palette.setColor( QPalette::Foreground, Qt::darkGray ); + palette.setColor( QPalette::WindowText, Qt::darkGray ); setPalette( palette ); + setAutoFillBackground( true ); + // ****************************************** // Handle all the signal connections // TODO : this solution if interaction monitoring is not elegant enough -- 1.7.9.5