summaryrefslogtreecommitdiffstats
path: root/src/styles/qmotifplusstyle.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-30 22:42:44 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2012-10-30 22:42:44 -0500
commit0836d4649ca26cc4e6e867ca5a4a3eafd995f807 (patch)
tree4b4a28e15a3be4a17fdf5025a46ff0f104fd91d8 /src/styles/qmotifplusstyle.cpp
parent970116b129a0dfd4ac8e90f1788ad7e81e3f6d71 (diff)
downloadtqt3-0836d4649ca26cc4e6e867ca5a4a3eafd995f807.tar.gz
tqt3-0836d4649ca26cc4e6e867ca5a4a3eafd995f807.zip
Automated update from Qt3
Diffstat (limited to 'src/styles/qmotifplusstyle.cpp')
-rw-r--r--src/styles/qmotifplusstyle.cpp41
1 files changed, 32 insertions, 9 deletions
diff --git a/src/styles/qmotifplusstyle.cpp b/src/styles/qmotifplusstyle.cpp
index 65fa0df9..d0b7fe98 100644
--- a/src/styles/qmotifplusstyle.cpp
+++ b/src/styles/qmotifplusstyle.cpp
@@ -282,6 +282,9 @@ void TQMotifPlusStyle::drawPrimitive( PrimitiveElement pe,
SFlags flags,
const TQStyleOption& opt ) const
{
+ bool dis = ! (flags & Style_Enabled);
+ bool act = flags & Style_Active;
+
switch (pe) {
case PE_HeaderSection:
@@ -638,6 +641,28 @@ void TQMotifPlusStyle::drawPrimitive( PrimitiveElement pe,
break;
}
+ case PE_PanelScrollBar:
+ {
+ drawMotifPlusShade(p, r, cg, TRUE, FALSE, &cg.brush(TQColorGroup::Mid));
+ break;
+ }
+
+ case PE_MenuItemIndicatorCheck:
+ {
+ int x, y, w, h;
+ r.rect(&x, &y, &w, &h);
+ TQRect vrect = visualRect( TQRect( x+2, y+2, w, h-2 ), r );
+
+ SFlags cflags = Style_Default;
+ if (! dis)
+ cflags |= Style_Enabled;
+ if (act)
+ cflags |= Style_On;
+
+ drawPrimitive(PE_CheckMark, p, ceData, elementFlags, vrect, cg, cflags);
+ break;
+ }
+
default:
TQMotifStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, flags, opt);
break;
@@ -828,13 +853,7 @@ void TQMotifPlusStyle::drawControl( ControlElement element,
} else if (checkable) {
if (mi->isChecked()) {
- SFlags cflags = Style_Default;
- if (! dis)
- cflags |= Style_Enabled;
- if (act)
- cflags |= Style_On;
-
- drawPrimitive(PE_CheckMark, p, ceData, elementFlags, vrect, cg, cflags);
+ drawPrimitive(PE_MenuItemIndicatorCheck, p, ceData, elementFlags, TQRect(x, y, checkcol, h), cg, flags);
}
}
@@ -1147,8 +1166,12 @@ void TQMotifPlusStyle::drawComplexControl(ComplexControl control,
if (controls == (SC_ScrollBarAddLine | SC_ScrollBarSubLine |
SC_ScrollBarAddPage | SC_ScrollBarSubPage |
SC_ScrollBarFirst | SC_ScrollBarLast | SC_ScrollBarSlider))
- drawMotifPlusShade(p, widget->rect(), cg, TRUE, FALSE,
- &cg.brush(TQColorGroup::Mid));
+ drawPrimitive(PE_PanelScrollBar, p, ceData, elementFlags, ceData.rect, cg,
+ ((maxedOut) ? Style_Default : Style_Enabled) |
+ ((active == SC_ScrollBarLast) ?
+ Style_Down : Style_Default) |
+ ((ceData.orientation == TQt::Horizontal) ?
+ Style_Horizontal : Style_Default));
if ((controls & SC_ScrollBarSubLine) && subline.isValid())
drawPrimitive(PE_ScrollBarSubLine, p, ceData, elementFlags, subline, cg,