The Birdfont Source Code


All Repositories / birdfont.git / blobdiff – RSS feed

Merge branch '2.14' of github.com:johanmattssonm/birdfont into 2.14

Changes made to libbirdfont/MainWindow.vala

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
--- libbirdfont/MainWindow.vala +++ libbirdfont/MainWindow.vala @@ -36,6 +36,8 @@ /** Number of pixels per mm */ public static double units = 1; + private static double scrollbar_size = -1; + public MainWindow () { singleton = this; @@ -248,10 +250,23 @@ public static void file_chooser (string title, FileChooser fc, uint flags) { MainWindow.native_window.file_chooser (title, fc, flags); + } + + public static void hide_scrollbar () { + if (!is_null (MainWindow.native_window)) { + MainWindow.native_window.set_scrollbar_size (-1); + } + } + + public static void show_scrollbar () { + if (!is_null (MainWindow.native_window)) { + MainWindow.native_window.set_scrollbar_size (scrollbar_size); + } } public static void set_scrollbar_size (double size) { if (!is_null (MainWindow.native_window)) { + scrollbar_size = size; MainWindow.native_window.set_scrollbar_size (size); } }