Commit 0564114
Use bf font for spin button label
Changed files (2)
Diff
@@ -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); } } @@ -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);