Commit 216364e
Store last color
Changed files (3)
modifiedlibbirdfont/ColorPicker.valamodifiedlibbirdfont/Expander.valamodifiedlibbirdfont/Path.vala
Diff
@@ -42,7 +42,7 @@ public class ColorPicker : Tool { }); panel_press_action.connect ((selected, button, tx, ty) => { - if (y <= ty <= y + 4 * bar_height) {+ if (y <= ty <= y + 5 * bar_height) { update_color = true; selected_bar = (int) ((ty - y) / bar_height); set_color_from_pointer (tx);@@ -89,10 +89,6 @@ public class ColorPicker : Tool { return new Color.hsba (hue, s, b, a); } - public void signal_color_updated () {- color_updated ();- }- public override void draw_tool (Context cr, double px, double py) { draw_bars (cr, px, py); draw_dial (cr, px, py, 0, hue);@@ -153,10 +153,6 @@ public class Expander : GLib.Object { foreach (Tool t in tool) { if (t.tool_is_visible ()) { new_row = xt + t.w > Toolbox.allocation_width - 7 * scale;- - if (t is ColorPicker) {- content_height += t.h;- } if (t is ZoomBar) { t.x = xt;@@ -759,6 +759,10 @@ public class Path { new_path.add_point (p); } + if (color != null) {+ new_path.color = ((!) color).copy ();+ }+ new_path.edit = edit; new_path.open = open; new_path.stroke = stroke;