Commit 5c10867
Merge branch '2.10'
Changed files (4)
modifiedlibbirdfont/SettingsDisplay.valamodifiedlibbirdfont/TabContent.valamodifiedlibbirdfont/Table.valamodifiedlibbirdfont/TableLayout.vala
Diff
@@ -220,7 +220,7 @@ public abstract class SettingsDisplay : FontDisplay { } public override void scroll_wheel (double x, double y, double pixeldelta, double dy) {- if (dy > 0) {+ if (dy < 0) { foreach (SettingsItem s in tools) { if (s.handle_events && s.button != null) { if (((!) s.button).is_over (x, y)) {@@ -240,7 +240,7 @@ public abstract class SettingsDisplay : FontDisplay { } } - scroll += dy * MainWindow.units;+ scroll -= dy * MainWindow.units; if (scroll + allocation.height >= content_height) { scroll = content_height - allocation.height;@@ -220,7 +220,7 @@ public class TabContent : GLib.Object { } if (!MainWindow.get_menu ().show_menu) {- GlyphCanvas.current_display.scroll_wheel (x, y, 15, 0);+ GlyphCanvas.current_display.scroll_wheel (x, y, 0, 15); } } @@ -230,7 +230,7 @@ public class TabContent : GLib.Object { } if (!MainWindow.get_menu ().show_menu) {- GlyphCanvas.current_display.scroll_wheel (x, y, -15, 0);+ GlyphCanvas.current_display.scroll_wheel (x, y, 0, -15); } } @@ -211,7 +211,7 @@ public abstract class Table : FontDisplay { } public override void scroll_wheel (double x, double y, double pixeldelta, double dy) {- scroll += dy * MainWindow.units;+ scroll -= dy * MainWindow.units; if (scroll > page_height - allocation.height) { scroll = page_height - allocation.height;@@ -212,22 +212,20 @@ public class TableLayout : FontDisplay { } public override void scroll_wheel (double x, double y, double pixeldelta, double dy) {- scroll += dy * MainWindow.units;-- if (dy > 0){ - if (scroll + allocation.height >= content_height) {- scroll = content_height - allocation.height;- - if (scroll < 0) {- scroll = 0;- }- }- } else {+ scroll -= dy * MainWindow.units;+ + if (scroll + allocation.height >= content_height) {+ scroll = content_height - allocation.height;+ if (scroll < 0) { scroll = 0;- } + } } + if (scroll < 0) {+ scroll = 0;+ } + update_scrollbar (); GlyphCanvas.redraw (); }