[rkward-cvs] SF.net SVN: rkward:[4036] trunk/rkward/rkward/windows/rkcommandeditorwindow .cpp

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri Nov 18 09:10:12 UTC 2011


Revision: 4036
          http://rkward.svn.sourceforge.net/rkward/?rev=4036&view=rev
Author:   tfry
Date:     2011-11-18 09:10:12 +0000 (Fri, 18 Nov 2011)
Log Message:
-----------
Try even harder to mimick tooltips

Modified Paths:
--------------
    trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp

Modified: trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp	2011-11-17 21:59:00 UTC (rev 4035)
+++ trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp	2011-11-18 09:10:12 UTC (rev 4036)
@@ -828,6 +828,7 @@
 //////////////////////// RKFunctionArgHinter //////////////////////////////
 
 #include <QToolTip>
+#include <QStyle>
 
 #include "../core/rfunctionobject.h"
 
@@ -848,10 +849,13 @@
 	QPalette p = QToolTip::palette ();		// HACK to trick the style into using the correct color
 	p.setColor (QPalette::Inactive, QPalette::Window, p.color (QPalette::Inactive, QPalette::ToolTipBase));
 	p.setColor (QPalette::Inactive, QPalette::WindowText, p.color (QPalette::Inactive, QPalette::ToolTipText));
+	arghints_popup->setForegroundRole (QPalette::ToolTipText);
+	arghints_popup->setBackgroundRole (QPalette::ToolTipBase);
 	arghints_popup->setPalette (p);
 	arghints_popup->setFrameStyle (QFrame::Box);
 	arghints_popup->setLineWidth (1);
 	arghints_popup->setWordWrap (true);
+	arghints_popup->setWindowOpacity (arghints_popup->style ()->styleHint (QStyle::SH_ToolTipLabel_Opacity, 0, arghints_popup) / 255.0);
 	arghints_popup->hide ();
 	active = false;
 

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.





More information about the rkward-tracker mailing list