From c955d1657441941a7afd3e9c5d43844c628419f1 Mon Sep 17 00:00:00 2001 From: Hugo Pereira Da Costa Date: Fri, 18 Sep 2009 19:47:53 +0000 Subject: [PATCH] added smooth transition for title bar text color when switching between active and inactive state (previously available for 'outline' mode only) svn path=/trunk/KDE/kdebase/workspace/; revision=1025447 --- clients/oxygen/oxygenclient.cpp | 21 ++++++++++++--------- clients/oxygen/oxygenclient.h | 3 +++ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/clients/oxygen/oxygenclient.cpp b/clients/oxygen/oxygenclient.cpp index 6d8dbb0f5e..144dc6695e 100644 --- a/clients/oxygen/oxygenclient.cpp +++ b/clients/oxygen/oxygenclient.cpp @@ -375,21 +375,24 @@ namespace Oxygen //_________________________________________________________ QColor OxygenClient::titlebarTextColor(const QPalette &palette) + { + if( timeLineIsRunning() ) return KColorUtils::mix( + titlebarTextColor( palette, false ), + titlebarTextColor( palette, true ), + opacity() ); + else return titlebarTextColor( palette, isActive() ); + } + + //_________________________________________________________ + QColor OxygenClient::titlebarTextColor(const QPalette &palette, bool active) { if( configuration().drawTitleOutline() ) { - if( timeLineIsRunning() ) - { + return options()->color(ColorFont, active); - return KColorUtils::mix( - options()->color(ColorFont, false), - options()->color(ColorFont, true ), opacity() ); - - } else return options()->color(ColorFont, isActive()); - - } else if (isActive()) { + } else if( active ){ return palette.color(QPalette::Active, QPalette::WindowText); diff --git a/clients/oxygen/oxygenclient.h b/clients/oxygen/oxygenclient.h index 9a35bacd00..33191fa8c9 100644 --- a/clients/oxygen/oxygenclient.h +++ b/clients/oxygen/oxygenclient.h @@ -169,6 +169,9 @@ namespace Oxygen //! text color QColor titlebarTextColor(const QPalette&); + //! text color + QColor titlebarTextColor(const QPalette&, bool active); + //!@name size grip //@{