diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-10-17 15:05:01 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2012-10-17 15:05:01 -0500 |
commit | fb2b1442644d0b35d004f3896efc0afa5a5b81a5 (patch) | |
tree | 438e47c523108f72d81fda90df29238da32b05f0 /kstyles/highcontrast/highcontrast.cpp | |
parent | 2ed8f9ade70bd38a541d7e62e02962a1311aabb5 (diff) | |
download | tdelibs-fb2b1442644d0b35d004f3896efc0afa5a5b81a5.tar.gz tdelibs-fb2b1442644d0b35d004f3896efc0afa5a5b81a5.zip |
Do not use direct widget access when drawing tabs and popup menus
Diffstat (limited to 'kstyles/highcontrast/highcontrast.cpp')
-rw-r--r-- | kstyles/highcontrast/highcontrast.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
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 ); |