summaryrefslogtreecommitdiffstats
path: root/tdefx/kstyle.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-08 17:47:50 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-08-08 17:47:50 -0500
commit0ee242623bc254b99d10bac9973cb375cb3aa3a9 (patch)
treeaf0b7bbe57293544959903d37c581c42c6d53ae4 /tdefx/kstyle.cpp
parent5df549ce8d57f5622ab5e0b9037994a07eb7f28d (diff)
downloadtdelibs-0ee242623bc254b99d10bac9973cb375cb3aa3a9.tar.gz
tdelibs-0ee242623bc254b99d10bac9973cb375cb3aa3a9.zip
Update style API
Diffstat (limited to 'tdefx/kstyle.cpp')
-rw-r--r--tdefx/kstyle.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/tdefx/kstyle.cpp b/tdefx/kstyle.cpp
index a983bd1d2..d95d98281 100644
--- a/tdefx/kstyle.cpp
+++ b/tdefx/kstyle.cpp
@@ -302,15 +302,22 @@ void KStyle::unPolish( TQStyleControlElementData ceData, ControlElementFlags ele
// Style changes (should) always re-polish popups.
-void KStyle::polishPopupMenu( TQPopupMenu* p )
+void KStyle::polishPopupMenu( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr )
{
- if (!p->testWState( WState_Polished ))
- p->setCheckable(true);
+ if ( !(ceData.windowState & WState_Polished ) ) {
+ widgetActionRequest(ceData, elementFlags, ptr, WAR_SetCheckable);
+ }
- // Install transparency handler if the effect is enabled.
- if ( d->menuHandler &&
- (strcmp(p->name(), "tear off menu") != 0))
- p->installEventFilter(d->menuHandler);
+ if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
+ TQWidget* widget = reinterpret_cast<TQWidget*>(ptr);
+ TQPopupMenu *p = dynamic_cast<TQPopupMenu*>(widget);
+ if (p) {
+ // Install transparency handler if the effect is enabled.
+ if ( d->menuHandler && (strcmp(p->name(), "tear off menu") != 0)) {
+ p->installEventFilter(d->menuHandler);
+ }
+ }
+ }
}