diff options
author | Darrell Anderson <humanreadable@yahoo.com> | 2012-10-19 22:33:10 -0500 |
---|---|---|
committer | Darrell Anderson <humanreadable@yahoo.com> | 2012-10-19 22:33:10 -0500 |
commit | 481457e5859adea2b83aba47b6d5d724b4c7bf24 (patch) | |
tree | 61854d5d93e9c24c453d38dff5d2c50c198ac3fc /kstyles/kthemestyle/kthemestyle.cpp | |
parent | bf94fa1cd02da4ac25a710440fc62170b5609e75 (diff) | |
parent | fb2b1442644d0b35d004f3896efc0afa5a5b81a5 (diff) | |
download | tdelibs-481457e5859adea2b83aba47b6d5d724b4c7bf24.tar.gz tdelibs-481457e5859adea2b83aba47b6d5d724b4c7bf24.zip |
Merge branch 'master' of http://scm.trinitydesktop.org/scm/git/tdelibs
Diffstat (limited to 'kstyles/kthemestyle/kthemestyle.cpp')
-rw-r--r-- | kstyles/kthemestyle/kthemestyle.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp index 50f14b9e3..9a604014e 100644 --- a/kstyles/kthemestyle/kthemestyle.cpp +++ b/kstyles/kthemestyle/kthemestyle.cpp @@ -1261,11 +1261,10 @@ void KThemeStyle::drawControl( ControlElement element, case CE_TabBarTab: { - const TQTabBar* tb = ( const TQTabBar* ) widget; - TQTabBar::Shape tbs = tb->shape(); + TQTabBar::Shape tbs = ceData.tabBarData.shape; bool selected = how & Style_Selected; WidgetType widget = selected ? ActiveTab : InactiveTab; - const TQColorGroup *cg = colorGroup( tb->colorGroup(), widget ); + const TQColorGroup *cg = colorGroup( ceData.colorGroup, widget ); int i; int x2 = x + w - 1, y2 = y + h - 1; int bWidth = borderWidth( widget ); @@ -1276,7 +1275,7 @@ void KThemeStyle::drawControl( ControlElement element, if ( !selected ) { p->fillRect( x, y, x2 - x + 1, 2, - tb->palette().active().brush( TQColorGroup::Background ) ); + ceData.palette.active().brush( TQColorGroup::Background ) ); y += 2; } p->setPen( cg->text() ); @@ -1338,8 +1337,8 @@ void KThemeStyle::drawControl( ControlElement element, else p->fillRect( x, y, x2 - x + 1, y2 - y + 1, cg->background() ); } - else if ( tb->shape() == TQTabBar::RoundedBelow || - tb->shape() == TQTabBar::TriangularBelow ) + else if ( ceData.tabBarData.shape == TQTabBar::RoundedBelow || + ceData.tabBarData.shape == TQTabBar::TriangularBelow ) { if ( widget == ActiveTab ) widget = RotActiveTab; @@ -1349,7 +1348,7 @@ void KThemeStyle::drawControl( ControlElement element, if ( !selected ) { p->fillRect( x, y2 - 2, x2 - x + 1, 2, - tb->palette().active().brush( TQColorGroup::Background ) ); + ceData.palette.active().brush( TQColorGroup::Background ) ); y2 -= 2; } p->setPen( cg->text() ); @@ -1451,7 +1450,6 @@ void KThemeStyle::drawControl( ControlElement element, int x, y, w, h; r.rect( &x, &y, &w, &h ); - const TQPopupMenu *popupmenu = ( const TQPopupMenu * ) widget; TQMenuItem *mi = opt.menuItem(); if ( mi ) { @@ -1461,7 +1459,7 @@ void KThemeStyle::drawControl( ControlElement element, int tab = opt.tabWidth(); int checkcol = opt.maxIconWidth(); bool enabled = (mi? mi->isEnabled():true); - bool checkable = popupmenu->isCheckable(); + bool checkable = (elementFlags & CEF_IsCheckable); bool active = how & Style_Active; bool etchtext = styleHint( SH_EtchDisabledText, ceData, elementFlags, TQStyleOption::Default, 0, 0 ); bool reverse = TQApplication::reverseLayout(); |