[rkward-cvs] SF.net SVN: rkward:[3177] trunk/rkward

tfry at users.sourceforge.net tfry at users.sourceforge.net
Wed Nov 3 18:54:06 UTC 2010


Revision: 3177
          http://rkward.svn.sourceforge.net/rkward/?rev=3177&view=rev
Author:   tfry
Date:     2010-11-03 18:54:06 +0000 (Wed, 03 Nov 2010)

Log Message:
-----------
Hack around the style rendering using the wrong color roles

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

Modified: trunk/rkward/ChangeLog
===================================================================
--- trunk/rkward/ChangeLog	2010-11-02 20:37:27 UTC (rev 3176)
+++ trunk/rkward/ChangeLog	2010-11-03 18:54:06 UTC (rev 3177)
@@ -1,3 +1,4 @@
+- Fixed: Did not respect system settings for tooltip background color in some styles
 - Fixed: Installation would continue, seemingly successfully, even if R support libraries could not be installed
 - Fixed: Function argument hints would sometimes persist after closing a script window
 - Fixed: "Vector" mode in "Paste special" action did not work correctly

Modified: trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp	2010-11-02 20:37:27 UTC (rev 3176)
+++ trunk/rkward/rkward/windows/rkcommandeditorwindow.cpp	2010-11-03 18:54:06 UTC (rev 3177)
@@ -767,10 +767,11 @@
 	}
 
 	arghints_popup = new QLabel (0, Qt::ToolTip);
-	arghints_popup->setForegroundRole (QPalette::ToolTipText);
-	arghints_popup->setBackgroundRole (QPalette::ToolTipBase);
 	arghints_popup->setMargin (2);
-	arghints_popup->setPalette (QToolTip::palette());
+	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::Text, p.color (QPalette::Inactive, QPalette::ToolTipText));
+	arghints_popup->setPalette (p);
 	arghints_popup->setFrameStyle (QFrame::Box);
 	arghints_popup->setLineWidth (1);
 	arghints_popup->setWordWrap (true);


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