--Boundary-00=_o9gb9r1h4Y0QIxF Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 29 August 2002 11:30, Friedrich W. H. Kossebau wrote: > [..] > For the records: I just saw a screenshot of openoffice. Guess what one > could see there: Greyed out scrollbar buttons (where the bar had reached > the border)! > > So this might be something to become a standard in KDE, too. But that is > left to others. I don't code (right now), so I don't decide ;) > > Bu at least I will file a wish to the KDE bugsystem. As I am no user of > KDE 3.x I would like to know: Are there any qt/kde styles where there is > already such a feature implemented? Yes, .NET does change the arrows when the top/botton is reached. Because I= =20 liked the idea and wanted to try it out with the highcolor default style I= =20 made some rough changes to KStyle (see the attached patch). It works by=20 disabling the appropriate arrow button. My first impression was that the button changes were a bit disturbing. But= =20 that could be caused by the fact that I'm paying extra attention to them. S= o=20 I have to use it for a longer time before I can decide if I like it. =2D-=20 Greetings, Wilco --Boundary-00=_o9gb9r1h4Y0QIxF Content-Type: text/x-diff; charset="iso-8859-1"; name="kstyle.cpp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kstyle.cpp.diff" Index: kstyle.cpp =================================================================== RCS file: /home/kde/kdelibs/kdefx/kstyle.cpp,v retrieving revision 1.25 diff -u -p -b -r1.25 kstyle.cpp --- kstyle.cpp 2002/08/18 00:35:49 1.25 +++ kstyle.cpp 2002/08/29 12:00:03 @@ -962,8 +962,16 @@ void KStyle::drawComplexControl( Complex const QScrollBar *sb = (const QScrollBar*)widget; bool maxedOut = (sb->minValue() == sb->maxValue()); bool horizontal = (sb->orientation() == Qt::Horizontal); - SFlags sflags = ((horizontal ? Style_Horizontal : Style_Default) | - (maxedOut ? Style_Default : Style_Enabled)); + bool atMinimum = (sb->value() == sb->minValue()); + bool atMaximum = (sb->value() == sb->maxValue()); + SFlags sflags = ((horizontal ? Style_Horizontal : Style_Default) + | (maxedOut ? Style_Default : Style_Enabled)); + SFlags addLineFlags = (horizontal ? Style_Horizontal : Style_Default) + | (atMaximum ? Style_Default : Style_Enabled) + | ((active == SC_ScrollBarAddLine) && !atMaximum ? Style_Down : Style_Default); + SFlags subLineFlags = (horizontal ? Style_Horizontal : Style_Default) + | (atMinimum ? Style_Default : Style_Enabled) + | ((active == SC_ScrollBarSubLine) && !atMinimum ? Style_Down : Style_Default); QRect addline, subline, subline2, addpage, subpage, slider, first, last; subline = querySubControlMetrics(control, widget, SC_ScrollBarSubLine, opt); @@ -982,21 +990,15 @@ void KStyle::drawComplexControl( Complex subline2.moveBy(0, -addline.height()); // Draw the up/left button set - if ((controls & SC_ScrollBarSubLine) && subline.isValid()) { - drawPrimitive(PE_ScrollBarSubLine, p, subline, cg, - sflags | (active == SC_ScrollBarSubLine ? - Style_Down : Style_Default)); + if (/*(controls & SC_ScrollBarSubLine) &&*/ subline.isValid()) { + drawPrimitive(PE_ScrollBarSubLine, p, subline, cg, subLineFlags); if (useThreeButtonScrollBar && subline2.isValid()) - drawPrimitive(PE_ScrollBarSubLine, p, subline2, cg, - sflags | (active == SC_ScrollBarSubLine ? - Style_Down : Style_Default)); + drawPrimitive(PE_ScrollBarSubLine, p, subline2, cg, subLineFlags); } - if ((controls & SC_ScrollBarAddLine) && addline.isValid()) - drawPrimitive(PE_ScrollBarAddLine, p, addline, cg, - sflags | ((active == SC_ScrollBarAddLine) ? - Style_Down : Style_Default)); + if (/*(controls & SC_ScrollBarAddLine) &&*/ addline.isValid()) + drawPrimitive(PE_ScrollBarAddLine, p, addline, cg, addLineFlags); if ((controls & SC_ScrollBarSubPage) && subpage.isValid()) drawPrimitive(PE_ScrollBarSubPage, p, subpage, cg, --Boundary-00=_o9gb9r1h4Y0QIxF-- _______________________________________________ kde-usability mailing list kde-usability@mail.kde.org http://mail.kde.org/mailman/listinfo/kde-usability