Commit 97ad54f
Fix bugs in file dialog on windows
Changed files (3)
modifiedlibbirdfont/FileDialogTab.valamodifiedlibbirdfont/SettingsDisplay.valamodifiedlibbirdfont/Table.vala
Diff
@@ -61,9 +61,13 @@ public class FileDialogTab : Table { 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 @@ public class FileDialogTab : Table { files.sort (); - selected_canvas ();+ layout ();+ base.selected_canvas (); } public void show_text_area (string text) {@@ -215,6 +220,11 @@ public class FileDialogTab : Table { 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 { public string file_name; @@ -263,7 +263,7 @@ public class SettingsDisplay : FontDisplay { } } - void layout () {+ public void layout () { double y = -scroll; bool first = true; foreach (SettingsItem s in tools) {@@ -65,7 +65,7 @@ public abstract class Table : FontDisplay { } } - private void layout () {+ public void layout () { int width; rows = get_rows ();@@ -243,7 +243,7 @@ public abstract class Table : FontDisplay { } 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);