diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-10-18 16:52:47 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-10-18 17:33:25 +0200 |
commit | 7cd58dbe32e5421986216dd7c6b24a4bb0b9c1e5 (patch) | |
tree | 21a2ec0b463355c4cd1a4d3730a52ee6ffc38a62 /vcl/unx/kde4 | |
parent | 1836e37f831dd5da06f12bc34d995610a81b6181 (diff) |
style tooltips properly with KDE4 vclplug (fdo#40461)
Diffstat (limited to 'vcl/unx/kde4')
-rw-r--r-- | vcl/unx/kde4/KDESalFrame.cxx | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx index 10e73502927c..4dd54e58f7b5 100644 --- a/vcl/unx/kde4/KDESalFrame.cxx +++ b/vcl/unx/kde4/KDESalFrame.cxx @@ -38,6 +38,8 @@ #include <kmainwindow.h> #include <kapplication.h> #include <ktoolbar.h> +#include <qdebug.h> +#include <qtooltip.h> #undef Region @@ -239,11 +241,9 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings ) style.SetFieldTextColor( aText ); style.SetFieldRolloverTextColor( aText ); style.SetWindowTextColor( aText ); - style.SetHelpTextColor( aText ); // Base style.SetFieldColor( aBase ); - style.SetHelpColor( aBase ); style.SetWindowColor( aBase ); style.SetActiveTabColor( aBase ); @@ -268,11 +268,14 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings ) style.SetHighlightColor( aHigh ); style.SetHighlightTextColor( toColor(pal.color( QPalette::HighlightedText)) ); + // Tooltip + style.SetHelpColor( toColor( QToolTip::palette().color( QPalette::Active, QPalette::ToolTipBase ))); + style.SetHelpTextColor( toColor( QToolTip::palette().color( QPalette::Active, QPalette::ToolTipText ))); + // Font Font aFont = toFont( kapp->font(), rSettings.GetUILocale() ); style.SetAppFont( aFont ); - style.SetHelpFont( aFont ); style.SetMenuFont( aFont ); // will be changed according to pMenuBar //style.SetToolFont( aFont ); //already set above @@ -291,6 +294,8 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings ) } style.SetFloatTitleFont( aFont ); + style.SetHelpFont( toFont( QToolTip::font(), rSettings.GetUILocale())); + int flash_time = QApplication::cursorFlashTime(); style.SetCursorBlinkTime( flash_time != 0 ? flash_time/2 : STYLE_CURSOR_NOBLINKTIME ); |