summaryrefslogtreecommitdiffstats
path: root/kstyles/keramik
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-11-11 18:02:30 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-11-11 18:02:30 -0600
commit189c12d0b1d3362f490f26cc0fcd3005af8b426c (patch)
tree3f363bf7153f01c94990af3ad4fc518de198dba3 /kstyles/keramik
parent03733ab120b5c50be66c7d03fc3926d7815a8cfb (diff)
downloadtdelibs-189c12d0b1d3362f490f26cc0fcd3005af8b426c.tar.gz
tdelibs-189c12d0b1d3362f490f26cc0fcd3005af8b426c.zip
Fix style crashes when used with third party toolkits
Diffstat (limited to 'kstyles/keramik')
-rw-r--r--kstyles/keramik/keramik.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/kstyles/keramik/keramik.cpp b/kstyles/keramik/keramik.cpp
index b3c29d34f..2c558b5b1 100644
--- a/kstyles/keramik/keramik.cpp
+++ b/kstyles/keramik/keramik.cpp
@@ -2184,15 +2184,14 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control,
}
case CC_ScrollBar:
{
- const TQScrollBar* sb = static_cast< const TQScrollBar* >( widget );
- if (highlightScrollBar && sb->parentWidget()) //Don't do the check if not highlighting anyway
+ if (highlightScrollBar && (elementFlags & CEF_HasParentWidget)) //Don't do the check if not highlighting anyway
{
- if (sb->parentWidget()->colorGroup().button() != sb->colorGroup().button())
+ if (ceData.parentWidgetData.colorGroup.button() != ceData.colorGroup.button())
customScrollMode = true;
}
- bool horizontal = sb->orientation() == Qt::Horizontal;
+ bool horizontal = ceData.orientation == TQt::Horizontal;
TQRect slider, subpage, addpage, subline, addline;
- if ( sb->minValue() == sb->maxValue() ) flags &= ~Style_Enabled;
+ if ( ceData.minSteps == ceData.maxSteps ) flags &= ~Style_Enabled;
slider = querySubControlMetrics( control, ceData, elementFlags, SC_ScrollBarSlider, opt, widget );
subpage = querySubControlMetrics( control, ceData, elementFlags, SC_ScrollBarSubPage, opt, widget );
@@ -2208,9 +2207,9 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control,
if ( controls & SC_ScrollBarSubPage ) clip |= subpage;
if ( controls & SC_ScrollBarAddPage ) clip |= addpage;
if ( horizontal )
- clip |= TQRect( slider.x(), 0, slider.width(), sb->height() );
+ clip |= TQRect( slider.x(), 0, slider.width(), ceData.rect.height() );
else
- clip |= TQRect( 0, slider.y(), sb->width(), slider.height() );
+ clip |= TQRect( 0, slider.y(), ceData.rect.width(), slider.height() );
clip ^= slider;
p->setClipRegion( clip );