Clone in a terminal:
Commit 0564114
Johan Mattsson - 2015-03-17T18:13:59+00:00
056411488b750785991fa5e204c80aa5a84c7251johan.mattsson.m@gmail.com

Use bf font for spin button label

Changed files (2)

Diff

diff --git a/libbirdfont/SpinButton.vala b/libbirdfont/SpinButton.valaindex d393d52..1530eb1 100644--- a/libbirdfont/SpinButton.vala+++ b/libbirdfont/SpinButton.vala@@ -440,30 +440,24 @@ public class SpinButton : Tool { 		double scale = Toolbox.get_scale (); 		 		double xt = x + w / 2;-		double yt = y + h / 2;+		double yt = y; -		double text_x = -15 * scale;-		double text_y = 3 * scale;+		double text_x = -14 * scale;+		double text_y = 7 * scale;+		Text text = new Text (get_short_display_value (), 15); 		 		base.draw (cr); 	 		if (!show_icon_tool_icon || waiting_for_icon_switch) {-			cr.save ();-			Theme.color (cr, "Background 2");-			cr.set_font_size (10 * scale);-			cr.select_font_face ("Cantarell", FontSlant.NORMAL, FontWeight.NORMAL);-			-			if (BirdFont.android) {-				cr.move_to (xt + text_x + 0.6 * MainWindow.units, yt + text_y);-			} else if (BirdFont.mac || BirdFont.win32)  {-				cr.move_to (xt + text_x + 2, yt + text_y);+			if (is_selected ()) {+				Theme.text_color (text, "Selected Tool Foreground"); 			} else {-				cr.move_to (xt + text_x, yt + text_y);+				Theme.text_color (text, "Tool Foreground"); 			} 			-			cr.show_text (get_short_display_value ());-			-			cr.restore ();+			text.widget_x = xt + text_x;+			text.widget_y = yt + text_y;+			text.draw (cr); 		} 	} 	diff --git a/libbirdfont/TabBar.vala b/libbirdfont/TabBar.valaindex aa82ba8..cbd69c1 100644--- a/libbirdfont/TabBar.vala+++ b/libbirdfont/TabBar.vala@@ -670,12 +670,6 @@ public class TabBar : GLib.Object { 			progress_icon.set_font_size (progress_size); 			progress_icon.widget_x = 0; 			progress_icon.widget_y = 0;-						-			c.save ();-			c.rectangle (0, 0, progress_size, progress_size);-			c.set_line_width (0);-			c.set_source_rgba (background_r, background_g, background_b, 1);-			c.fill_preserve ();	 			 			c.translate (progress_size / 2.0, progress_size / 2.0); 			c.rotate (wheel_rotation);

Contact

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