The Birdfont Source Code


All Repositories / birdfont.git / commit – RSS feed

Fix bugs in file dialog on windows

These changes was commited to the Birdfont repository Mon, 13 Apr 2015 21:02:58 +0000.

Contributing

Send patches or pull requests to johan.mattsson.m@gmail.com.
Clone this repository: git clone https://github.com/johanmattssonm/birdfont.git
author Johan Mattsson <johan.mattsson.m@gmail.com>
Mon, 13 Apr 2015 21:02:58 +0000 (23:02 +0200)
committer Johan Mattsson <johan.mattsson.m@gmail.com>
Mon, 13 Apr 2015 21:02:58 +0000 (23:02 +0200)
commit 97ad54fdf0427c6c92637a7d83afc460960b2a59
tree 22f853276d1ec2f2757252ab2b5d39eacc8e9831
parent 22f73f2bca0a14534d5cfcfb862debd7ab1a361c
Fix bugs in file dialog on windows

libbirdfont/FileDialogTab.vala
libbirdfont/SettingsDisplay.vala
libbirdfont/Table.vala
--- a/libbirdfont/FileDialogTab.vala +++ b/libbirdfont/FileDialogTab.vala @@ -61,9 +61,13 @@ Row row; rows.clear (); - + + // add empty rows under the text area + row = new Row.headline (""); + rows.add (row); + if (directories.size > 0) { - row = new Row.headline (t_("Directories")); + row = new Row.headline (t_("Folders")); rows.add (row); } @@ -165,7 +169,8 @@ files.sort (); - selected_canvas (); + layout (); + base.selected_canvas (); } public void show_text_area (string text) { @@ -213,6 +218,11 @@ public override string get_name () { return "FileDialogTab"; + } + + public override void button_release (int button, double ex, double ey) { + base.button_release (button, ex, ey); + show_text_area (selected_filename); } class SelectedFile : GLib.Object {
--- a/libbirdfont/SettingsDisplay.vala +++ b/libbirdfont/SettingsDisplay.vala @@ -263,7 +263,7 @@ } } - void layout () { + public void layout () { double y = -scroll; bool first = true; foreach (SettingsItem s in tools) {
--- a/libbirdfont/Table.vala +++ b/libbirdfont/Table.vala @@ -65,7 +65,7 @@ } } - private void layout () { + public void layout () { int width; rows = get_rows (); @@ -243,7 +243,7 @@ } public override void scroll_to (double percent) { - scroll = percent * page_height; + scroll = percent * (page_height - allocation.height); if (scroll > page_height) { scroll = (int) (page_height - allocation.height);