summaryrefslogtreecommitdiffstats
path: root/style/lipstik.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'style/lipstik.cpp')
-rw-r--r--style/lipstik.cpp25
1 files changed, 9 insertions, 16 deletions
diff --git a/style/lipstik.cpp b/style/lipstik.cpp
index 4ba5deb..46dc294 100644
--- a/style/lipstik.cpp
+++ b/style/lipstik.cpp
@@ -2619,24 +2619,19 @@ void LipstikStyle::drawControl(ControlElement element,
// TABS
// ----
case CE_TabBarTab: {
- const TQTabBar * tb = (const TQTabBar *) widget;
bool cornerWidget = false;
- if( ::tqqt_cast<TQTabWidget*>(tb->parent()) ) {
- const TQTabWidget *tw = (const TQTabWidget*)tb->parent();
- // is there a corner widget in the (top) left edge?
- TQWidget *cw = tw->cornerWidget(TQt::TopLeft);
- if(cw)
- cornerWidget = true;
+ if (!ceData.tabBarData.cornerWidgets[TQStyleControlElementTabBarData::CWL_TopLeft].widgetObjectTypes.isEmpty()) {
+ cornerWidget = true;
}
- TQTabBar::Shape tbs = tb->shape();
+ TQTabBar::Shape tbs = ceData.tabBarData.shape;
bool selected = false;
if (flags & Style_Selected) selected = true;
TabPosition pos;
- if (tb->count() == 1) {
+ if (ceData.tabBarData.tabCount == 1) {
pos = Single;
- } else if ((tb->indexOf(opt.tab()->identifier()) == 0)) {
+ } else if ((ceData.tabBarData.identIndexMap[opt.tab()->identifier()] == 0)) {
pos = First;
- } else if (tb->indexOf(opt.tab()->identifier()) == tb->count() - 1) {
+ } else if (ceData.tabBarData.identIndexMap[opt.tab()->identifier()] == ceData.tabBarData.tabCount - 1) {
pos = Last;
} else {
pos = Middle;
@@ -2831,7 +2826,6 @@ void LipstikStyle::drawControl(ControlElement element,
// POPUPMENU ITEM (highlighted on mouseover)
// ------------------------------------------
case CE_PopupMenuItem: {
- const TQPopupMenu *popupmenu = static_cast< const TQPopupMenu * >( widget );
TQMenuItem *mi = opt.menuItem();
if ( !mi )
@@ -2846,7 +2840,7 @@ void LipstikStyle::drawControl(ControlElement element,
int tab = opt.tabWidth();
int checkcol = opt.maxIconWidth();
bool enabled = mi->isEnabled();
- bool checkable = popupmenu->isCheckable();
+ bool checkable = (elementFlags & CEF_IsCheckable);
bool active = flags & Style_Active;
bool etchtext = styleHint( SH_EtchDisabledText, ceData, elementFlags );
bool reverse = TQApplication::reverseLayout();
@@ -3748,9 +3742,8 @@ int LipstikStyle::pixelMetric(PixelMetric m, TQStyleControlElementData ceData, C
// TABS
// ----
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 12;
else
return 4;