Clone in a terminal:
Commit 6f92a5f
Johan Mattsson - 2013-09-10T04:13:22+00:00
6f92a5f2cb54832cb9fbfc39ac852d45d994c43bjohan.mattsson.m@gmail.com

create folder for backgrounds

Changed files (4)

Diff

diff --git a/birdfont/GtkWindow.vala b/birdfont/GtkWindow.valaindex 40a9a8e..c98cfa7 100644--- a/birdfont/GtkWindow.vala+++ b/birdfont/GtkWindow.vala@@ -356,7 +356,7 @@ public class GtkWindow : Gtk.Window, NativeWindow { 	 	public void set_scrollbar_position (double position) { 		scrollbar_supress_signal = true;-		scrollbar.adjustment.value = (1 - scrollbar.adjustment.page_size) * position;+		scrollbar.adjustment.value = position * (1 - scrollbar.adjustment.page_size); 		scrollbar_supress_signal = false; 	} 	diff --git a/libbirdfont/BirdFontFile.vala b/libbirdfont/BirdFontFile.valaindex 20c4f6a..b26b771 100644--- a/libbirdfont/BirdFontFile.vala+++ b/libbirdfont/BirdFontFile.vala@@ -702,6 +702,10 @@ class BirdFontFile { 				data = attr_content; 			} 		}++		if (!font.get_backgrounds_folder ().query_exists ()) {+			DirUtils.create ((!) font.get_backgrounds_folder ().get_path (), 0xFFFFFF);+		} 		 		img_dir = font.get_backgrounds_folder ().get_child ("parts"); diff --git a/libbirdfont/KerningList.vala b/libbirdfont/KerningList.valaindex a864fa1..a8a05c9 100644--- a/libbirdfont/KerningList.vala+++ b/libbirdfont/KerningList.vala@@ -104,6 +104,10 @@ public class KerningList : FontDisplay { 			scroll = (int) (pairs - visible_rows); 		} 		+		if (visible_rows > pairs) {+			scroll = 0;+		} +		 		update_scrollbar (); 		redraw_area (0, 0, allocation.width, allocation.height); 	}diff --git a/libbirdfont/OverView.vala b/libbirdfont/OverView.valaindex a917269..2299d6d 100644--- a/libbirdfont/OverView.vala+++ b/libbirdfont/OverView.vala@@ -791,6 +791,7 @@ public class OverView : FontDisplay { 		double nrows = 0; 		double pos = 0; 		double size;+		double visible_rows; 		 		if (rows == 0) { 			MainWindow.set_scrollbar_size (0);@@ -809,9 +810,11 @@ public class OverView : FontDisplay { 				nrows = 1; 			} 			-			scroll_size = rows / (nrows - rows);+			// FIXME: this is not correct+			visible_rows = allocation.height / OverViewItem.height;+			scroll_size = visible_rows / nrows; 			MainWindow.set_scrollbar_size (scroll_size);-			pos = first_visible / (nrows * items_per_row - rows * items_per_row);+			pos = first_visible / (nrows * items_per_row - visible_rows * items_per_row); 			MainWindow.set_scrollbar_position (pos); 		} 	}

Contact

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