Clone in a terminal:
Commit 97ad54f
Johan Mattsson - 2015-04-13T21:02:58+00:00
97ad54fdf0427c6c92637a7d83afc460960b2a59johan.mattsson.m@gmail.com

Fix bugs in file dialog on windows

Changed files (3)

Diff

diff --git a/libbirdfont/FileDialogTab.vala b/libbirdfont/FileDialogTab.valaindex 303ce60..d373410 100644--- a/libbirdfont/FileDialogTab.vala+++ b/libbirdfont/FileDialogTab.vala@@ -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; 		diff --git a/libbirdfont/SettingsDisplay.vala b/libbirdfont/SettingsDisplay.valaindex 363b39f..c4ccbc5 100644--- a/libbirdfont/SettingsDisplay.vala+++ b/libbirdfont/SettingsDisplay.vala@@ -263,7 +263,7 @@ public class SettingsDisplay : FontDisplay { 		} 	}	 -	void layout () {+	public void layout () { 		double y = -scroll; 		bool first = true; 		foreach (SettingsItem s in tools) {diff --git a/libbirdfont/Table.vala b/libbirdfont/Table.valaindex c89cb59..701ae3e 100644--- a/libbirdfont/Table.vala+++ b/libbirdfont/Table.vala@@ -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);

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112