summaryrefslogtreecommitdiffstats
path: root/libreoffice/build/patches/libreoffice.kdetooltips.diff
blob: e86fe27665c71ebd0b8653b208e4c63c78a03ea4 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
commit c2f539bcd920de8d2fa2983e700895a7ea308c9b
Author: Lubo? Lu?ák <l.lunak@suse.cz>
Date:   Tue Oct 18 17:37:22 2011 +0200

    style tooltips properly with KDE4 vclplug (fdo#40461)
    
    ACK by Kendy.

diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index ab6bf1a..f9ae9f3 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
 
@@ -240,11 +242,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 );
     
@@ -280,11 +280,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
@@ -303,6 +306,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 );