[Scummvm-cvs-logs] scummvm master -> 34098bc688da2d7f0595cb618d30a252de67da6b
eriktorbjorn
eriktorbjorn at telia.com
Thu Dec 27 10:21:22 CET 2012
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
85beaf6fed GUI: Change value by one on mouse wheel, not by one pixel
34098bc688 NEWS: Document slider mousewheel change
Commit: 85beaf6fed59792046811231ce76ee08c593adf5
https://github.com/scummvm/scummvm/commit/85beaf6fed59792046811231ce76ee08c593adf5
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2012-12-27T01:13:48-08:00
Commit Message:
GUI: Change value by one on mouse wheel, not by one pixel
On file-grained sliders, changing the value by one pixel was
unpredictable because it wouldn't change by the same amount every
time. (And of course, some values were not possible to set.)
On course-grained sliders, changing the value by one pixel would
sometimes not change it at all, causing the slider to seem stuck.
Now the slider can be set to any value.
Changed paths:
gui/widget.cpp
diff --git a/gui/widget.cpp b/gui/widget.cpp
index 4ffb63e..c3f10a8 100644
--- a/gui/widget.cpp
+++ b/gui/widget.cpp
@@ -593,8 +593,8 @@ void SliderWidget::handleMouseUp(int x, int y, int button, int clickCount) {
void SliderWidget::handleMouseWheel(int x, int y, int direction) {
if (isEnabled() && !_isDragging) {
- // Increment or decrement one position
- int newValue = posToValue(valueToPos(_value) - 1 * direction);
+ // Increment or decrement by one
+ int newValue = _value - direction;
if (newValue < _valueMin)
newValue = _valueMin;
Commit: 34098bc688da2d7f0595cb618d30a252de67da6b
https://github.com/scummvm/scummvm/commit/34098bc688da2d7f0595cb618d30a252de67da6b
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2012-12-27T01:19:21-08:00
Commit Message:
NEWS: Document slider mousewheel change
It wasn't obvious that the feature was there at all, so now it is
at least mentioned somewhere.
Changed paths:
NEWS
diff --git a/NEWS b/NEWS
index 9affe57..74b8b04 100644
--- a/NEWS
+++ b/NEWS
@@ -15,6 +15,10 @@ For a more comprehensive changelog of the latest experimental code, see:
- Added Galician translation.
- Added Finnish translation.
- Added Belarusian translation.
+ - Using the mouse wheel on a slider widget now changes the value by the
+ smallest possible amount. This is more predictable than the old behaviour,
+ which was to change the value by "one pixel" which would sometimes not
+ change it at all.
Cine:
- Improved audio support for Amiga and AtariST versions of Future Wars.
More information about the Scummvm-git-logs
mailing list