Re: [Plib-devel] [RFC] changing slider behavior
Brought to you by:
sjbaker
|
From: John F. F. <joh...@cy...> - 2009-01-23 04:00:35
|
OK, that's in. I made up an address for "puAux.h" and found it there,
finishing the change set.
What was happening with me was that my spam filter caught some of the
e-mails but not the others, and the order of some of them was switched
around, and so life got very confusing. But do, please, let me know if I
made any mistakes in putting in the changes.
There were some compile warnings about type changes so I added some
explicit type casts.
- John
-----Original Message-----
From: Melchior FRANZ
Sent: Wednesday, January 21, 2009 5:25 PM
To: pli...@li...
Subject: Re: [Plib-devel] [RFC] changing slider behavior
OK, so I've implemented both old and new ("modern") behavior.
Actually, the former can be useful in some cases, where quick
selection of an estimated value is desirable without having
to grab a small slider handle. The old behavior is even default
now.
As the new behavior makes the slider position jump in fixed
intervals, for which a new parameter was required, this parameter
also decides whether old or new behavior should be used. In
the Qt-Toolkit these big steps are called PageStep (while the
small steps are called LineStep). I've used the same name:
setPageStepSize(0); ... no step chosen -> use default
(this is consistent with the already
existing puRange::setStepSize(),
where 0 also means to use a default)
setPageStepSize(4); ... increase/decrease value by 4 if one
clicks on the slider background rather
than the slider handle
setPageStepSize(-1); ... page steps disabled -> old behavior
(this is default)
The patch also fixes arrow highlighting in puaScrollBar. Somebody
had started to implement that, but stopped half-way. This wasn't
functional. Additionally, it reduced the slider minimum-width
from 10px to 8px. (I had introduced the 10px a few years ago,
but a bit smaller can't hurt.)
Files on my homepage. I hope this helps to apply the changes,
saving you from applying diffs manually. :-)
./src/pui/
http://members.aon.at/mfranz/plib/pu.h [45.2 kB]
http://members.aon.at/mfranz/plib/puSlider.cxx [6.1 kB]
./src/puAux/
http://members.aon.at/mfranz/plib/puAuxScrollBar.cxx [9.3 kB]
I'll submit the necessary changes do the HTML documentation in
another patch.
m.
------------------------------------------------------------------------
------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
plib-devel mailing list
pli...@li...
https://lists.sourceforge.net/lists/listinfo/plib-devel
|