mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-06 14:54:56 +01:00
add some scroll wheel support to the scroomer
git-svn-id: svn://localhost/ardour2/branches/3.0@9287 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
79c918fd6a
commit
847e8f0610
1 changed files with 17 additions and 6 deletions
|
|
@ -202,6 +202,23 @@ Scroomer::on_motion_notify_event (GdkEventMotion* ev)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool
|
||||||
|
Scroomer::on_scroll_event (GdkEventScroll* ev)
|
||||||
|
{
|
||||||
|
switch (ev->direction) {
|
||||||
|
case GDK_SCROLL_UP:
|
||||||
|
adj.set_value (adj.get_value() - adj.get_page_size()/10.0);
|
||||||
|
break;
|
||||||
|
case GDK_SCROLL_DOWN:
|
||||||
|
adj.set_value (adj.get_value() + adj.get_page_size()/10.0);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
Scroomer::on_button_press_event (GdkEventButton* ev)
|
Scroomer::on_button_press_event (GdkEventButton* ev)
|
||||||
{
|
{
|
||||||
|
|
@ -267,12 +284,6 @@ Scroomer::on_button_release_event (GdkEventButton* ev)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool
|
|
||||||
Scroomer::on_scroll_event (GdkEventScroll*)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
Scroomer::on_size_allocate (Allocation& a)
|
Scroomer::on_size_allocate (Allocation& a)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue