mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-18 20:10:29 +01:00
WINGs: inverted the direction for mouse wheel on WMSliders
The original choice may have looked mathematically correct, but it was actually counter-intuitive and opposite to what every other application do with sliders. Signed-off-by: Christophe CURIS <christophe.curis@free.fr> Signed-off-by: Carlos R. Mafra <crmafra@gmail.com>
This commit is contained in:
committed by
Carlos R. Mafra
parent
01fbeab1d4
commit
082de93ca0
@@ -410,16 +410,16 @@ static void handleActionEvents(XEvent * event, void *data)
|
|||||||
|
|
||||||
switch (event->type) {
|
switch (event->type) {
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
if (event->xbutton.button == WINGsConfiguration.mouseWheelUp && !sPtr->flags.dragging) {
|
if (event->xbutton.button == WINGsConfiguration.mouseWheelDown && !sPtr->flags.dragging) {
|
||||||
/* Wheel up */
|
/* Wheel down */
|
||||||
if (sPtr->value + 1 <= sPtr->maxValue) {
|
if (sPtr->value + 1 <= sPtr->maxValue) {
|
||||||
WMSetSliderValue(sPtr, sPtr->value + 1);
|
WMSetSliderValue(sPtr, sPtr->value + 1);
|
||||||
if (sPtr->flags.continuous && sPtr->action) {
|
if (sPtr->flags.continuous && sPtr->action) {
|
||||||
(*sPtr->action) (sPtr, sPtr->clientData);
|
(*sPtr->action) (sPtr, sPtr->clientData);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (event->xbutton.button == WINGsConfiguration.mouseWheelDown && !sPtr->flags.dragging) {
|
} else if (event->xbutton.button == WINGsConfiguration.mouseWheelUp && !sPtr->flags.dragging) {
|
||||||
/* Wheel down */
|
/* Wheel up */
|
||||||
if (sPtr->value - 1 >= sPtr->minValue) {
|
if (sPtr->value - 1 >= sPtr->minValue) {
|
||||||
WMSetSliderValue(sPtr, sPtr->value - 1);
|
WMSetSliderValue(sPtr, sPtr->value - 1);
|
||||||
if (sPtr->flags.continuous && sPtr->action) {
|
if (sPtr->flags.continuous && sPtr->action) {
|
||||||
|
|||||||
Reference in New Issue
Block a user