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 --- kstyles/highcontrast/highcontrast.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'kstyles/highcontrast') diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp index 7b6ed4a9e..9d28dfd05 100644 --- a/kstyles/highcontrast/highcontrast.cpp +++ b/kstyles/highcontrast/highcontrast.cpp @@ -770,8 +770,7 @@ void HighContrastStyle::drawControl (TQ_ControlElement element, setColorsNormal (p, cg, flags, Style_Selected); drawRoundRect (p, r); - const TQTabBar *tb = static_cast< const TQTabBar * >(widget); - TQTabBar::Shape shape = tb->shape(); + TQTabBar::Shape shape = ceData.tabBarData.shape; if (shape == TQTabBar::TriangularBelow || shape == TQTabBar::RoundedBelow) { p->fillRect (r.left(), r.top(), @@ -1001,14 +1000,13 @@ void HighContrastStyle::drawControl (TQ_ControlElement element, setColorsNormal (p, cg, flags, Style_Active|Style_MouseOver); p->fillRect (r, p->backgroundColor ()); - const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget; TQMenuItem *mi = opt.menuItem(); if (!mi) break; int tab = opt.tabWidth(); int checkcol = opt.maxIconWidth(); - bool checkable = popupmenu->isCheckable(); + bool checkable = (elementFlags & CEF_IsCheckable); bool reverse = TQApplication::reverseLayout(); int x, y, w, h; r.rect( &x, &y, &w, &h ); -- cgit v1.2.1