scroll by one line in textlist
to scroll by only one line, hold CONTROL key and scroll with mouse wheel
This commit is contained in:
@@ -83,8 +83,8 @@ int new_color(gui *gui, char *color);
|
||||
/* notifications */
|
||||
/* known notifications:
|
||||
* - textlist:
|
||||
* - scrollup { void *: NULL }
|
||||
* - scrolldown { void *: NULL }
|
||||
* - scrollup { int: key_modifiers }
|
||||
* - scrolldown { int: key_modifiers }
|
||||
* - click { int [2]: line, button }
|
||||
* - label:
|
||||
* - click { int: button } (if enabled)
|
||||
|
||||
@@ -54,11 +54,11 @@ static void button(gui *_g, widget *_this, int x, int y,
|
||||
x -= this->common.x;
|
||||
/* scroll up */
|
||||
if (button == 4 && up == 0) {
|
||||
gui_notify(g, "scrollup", _this, NULL);
|
||||
gui_notify(g, "scrollup", _this, &key_modifiers);
|
||||
}
|
||||
/* scroll down */
|
||||
if (button == 5 && up == 0) {
|
||||
gui_notify(g, "scrolldown", _this, NULL);
|
||||
gui_notify(g, "scrolldown", _this, &key_modifiers);
|
||||
}
|
||||
/* button 1/2/3 click */
|
||||
if (button >= 1 && button <= 3 && up == 0) {
|
||||
|
||||
Reference in New Issue
Block a user