summaryrefslogtreecommitdiffstats
path: root/tdefx/kstyle.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-17 15:05:01 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-17 15:05:01 -0500
commitfb2b1442644d0b35d004f3896efc0afa5a5b81a5 (patch)
tree438e47c523108f72d81fda90df29238da32b05f0 /tdefx/kstyle.cpp
parent2ed8f9ade70bd38a541d7e62e02962a1311aabb5 (diff)
downloadtdelibs-fb2b1442644d0b35d004f3896efc0afa5a5b81a5.tar.gz
tdelibs-fb2b1442644d0b35d004f3896efc0afa5a5b81a5.zip
Do not use direct widget access when drawing tabs and popup menus
Diffstat (limited to 'tdefx/kstyle.cpp')
-rw-r--r--tdefx/kstyle.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/tdefx/kstyle.cpp b/tdefx/kstyle.cpp
index e9e5d2105..8720d368d 100644
--- a/tdefx/kstyle.cpp
+++ b/tdefx/kstyle.cpp
@@ -701,8 +701,7 @@ void KStyle::drawControl( TQ_ControlElement element,
// TABS
// ------------------------------------------------------------------------
case CE_TabBarTab: {
- const TQTabBar* tb = (const TQTabBar*) widget;
- TQTabBar::Shape tbs = tb->shape();
+ TQTabBar::Shape tbs = ceData.tabBarData.shape;
bool selected = flags & Style_Selected;
int x = r.x(), y=r.y(), bottom=r.bottom(), right=r.right();
@@ -1043,17 +1042,15 @@ int KStyle::pixelMetric(PixelMetric m, TQStyleControlElementData ceData, Control
return 24;
case PM_TabBarTabVSpace: {
- const TQTabBar * tb = (const TQTabBar *) widget;
- if ( tb->shape() == TQTabBar::RoundedAbove ||
- tb->shape() == TQTabBar::RoundedBelow )
+ if ( ceData.tabBarData.shape == TQTabBar::RoundedAbove ||
+ ceData.tabBarData.shape == TQTabBar::RoundedBelow )
return 10;
else
return 4;
}
case PM_TabBarTabOverlap: {
- const TQTabBar* tb = (const TQTabBar*)widget;
- TQTabBar::Shape tbs = tb->shape();
+ TQTabBar::Shape tbs = ceData.tabBarData.shape;
if ( (tbs == TQTabBar::RoundedAbove) ||
(tbs == TQTabBar::RoundedBelow) )