From fb2b1442644d0b35d004f3896efc0afa5a5b81a5 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Wed, 17 Oct 2012 15:05:01 -0500 Subject: Do not use direct widget access when drawing tabs and popup menus --- tdefx/kstyle.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'tdefx') 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) ) -- cgit v1.2.1