Commit 0ca1056
Color for active control point handle
Changed files (7)
modifiedlibbirdfont/Glyph.valamodifiedlibbirdfont/Path.valamodifiedlibbirdfont/PenTool.valamodifiedlibbirdfont/Theme.valamodifiedresources/bright.thememodifiedresources/dark.thememodifiedresources/high_contrast.theme
Diff
@@ -185,7 +185,6 @@ public class Glyph : FontDisplay { pl = new PathList (); - print (@"$(get_name ()) get_visible_paths (): $(get_visible_paths ().size)\n"); foreach (Path p in get_visible_paths ()) { if (p.stroke > 0) { stroke = p.get_stroke ();@@ -476,11 +476,19 @@ public class Path : GLib.Object { if (e.get_left_handle ().selected) { color_left = Theme.get_color ("Selected Control Point Handle"); } else if (e.get_left_handle ().active) {- color_left = Theme.get_color ("Active Control Point Handle");+ color_left = Theme.get_color ("Active Handle"); } else { color_left = Theme.get_color ("Control Point Handle"); } + if (e.get_right_handle ().selected) {+ color_right = Theme.get_color ("Selected Control Point Handle");+ } else if (e.get_right_handle ().active) {+ color_right = Theme.get_color ("Active Handle");+ } else {+ color_right = Theme.get_color ("Control Point Handle");+ }+ if (!hide_end_handle || !(is_open () && e == points.get (points.size - 1))) { draw_line (handle_right, e, cr, 0.15); draw_control_point (cr, e.get_right_handle ().x, e.get_right_handle ().y, color_right);@@ -1499,7 +1499,7 @@ public class PenTool : Tool { if (active_handle.active) { Path.draw_control_point (cr, Glyph.path_coordinate_x (begin_action_x),- Glyph.path_coordinate_y (begin_action_y), Theme.get_color ("Control Point Handle")); + Glyph.path_coordinate_y (begin_action_y), Theme.get_color ("Active Control Point Handle")); } else if (selected_points.size > 0) { ps = selected_points.get (selected_points.size - 1); @@ -1977,6 +1977,11 @@ public class PenTool : Tool { eh = get_closest_handle (event_x, event_y); eh.handle.active = true;+ + if (active_handle != eh.handle) {+ GlyphCanvas.redraw ();+ }+ active_handle = eh.handle; } @@ -188,7 +188,8 @@ public class Theme : GLib.Object { Theme.set_default_color ("Quadratic Control Point", 123 / 255.0, 151 / 255.0, 184 / 255.0, 1); Theme.set_default_color ("Selected Control Point Handle", 0 / 255.0, 112 / 255.0, 244 / 255.0, 1);- Theme.set_default_color ("Active Control Point Handle", 81 / 255.0, 147 / 255.0, 90 / 255.0, 1);+ Theme.set_default_color ("Active Handle", 21 / 255.0, 44 / 255.0, 25 / 255.0, 1);+ Theme.set_default_color ("Control Point Handle", 81 / 255.0, 147 / 255.0, 90 / 255.0, 1); Theme.set_default_color ("Merge", 167 / 255.0, 170 / 255.0, 178 / 255.0, 0.3);@@ -294,8 +295,7 @@ public class Theme : GLib.Object { Theme.set_default_color ("Quadratic Control Point", 123 / 255.0, 151 / 255.0, 184 / 255.0, 1); Theme.set_default_color ("Selected Control Point Handle", 234 / 255.0, 77 / 255.0, 26 / 255.0, 1);- Theme.set_default_color ("Active Control Point Handle", 81 / 255.0, 147 / 255.0, 90 / 255.0, 1);- Theme.set_default_color ("Control Point Handle", 81 / 255.0, 147 / 255.0, 90 / 255.0, 1);+ Theme.set_default_color ("Active Handle", 21 / 255.0, 44 / 255.0, 25 / 255.0, 1); Theme.set_default_color ("Merge", 167 / 255.0, 170 / 255.0, 178 / 255.0, 0.3); @@ -400,7 +400,7 @@ public class Theme : GLib.Object { Theme.set_default_color ("Quadratic Control Point", 0, 0, 0, 1); Theme.set_default_color ("Selected Control Point Handle", 0, 0, 0, 1);- Theme.set_default_color ("Active Control Point Handle", 0, 0, 0, 1);+ Theme.set_default_color ("Active Handle", 0, 0, 0, 1); Theme.set_default_color ("Control Point Handle", 0, 0, 0, 1); Theme.set_default_color ("Merge", 0, 0, 0, 1);@@ -493,7 +493,7 @@ public class Theme : GLib.Object { t_("Cubic Quadratic Point"); t_("Selected Control Point Handle");- t_("Active Control Point Handle");+ t_("Active Handle"); t_("Control Point Handle"); t_("Merge");@@ -47,6 +47,7 @@ <color name="Overview Item 1" red="0.92549019607843142" green="0.92549019607843142" blue="0.92549019607843142" alpha="1"/> <color name="Cubic Control Point" red="0.45490196078431372" green="0.45490196078431372" blue="0.45490196078431372" alpha="1"/> <color name="Selected Active Quadratic Control Point" red="0" green="0.4392156862745098" blue="0.95686274509803926" alpha="1"/>+ <color name="Active Handle" red="0.082352941176470587" green="0.17254901960784313" blue="0.098039215686274508" alpha="1"/> <color name="Overview Item 2" red="0.96470588235294119" green="0.96470588235294119" blue="0.96470588235294119" alpha="1"/> <color name="Selected Button Foreground" red="0.011764705882352941" green="0.062745098039215685" blue="0.094117647058823528" alpha="1"/> <color name="Active Spin Button" red="0.40784313725490196" green="0.42352941176470588" blue="0.46666666666666667" alpha="1"/>@@ -62,7 +63,6 @@ <color name="Checkbox Background" red="1" green="1" blue="1" alpha="1"/> <color name="Active Cubic Control Point" red="0.27450980392156865" green="0.27450980392156865" blue="0.27450980392156865" alpha="1"/> <color name="Foreground 1" red="0" green="0" blue="0" alpha="1"/>- <color name="Active Control Point Handle" red="0.31764705882352939" green="0.57647058823529407" blue="0.35294117647058826" alpha="1"/> <color name="Merge" red="0.65490196078431373" green="0.66666666666666663" blue="0.69803921568627447" alpha="0.29999999999999999"/> <color name="Headline Background" red="0.43137254901960786" green="0.44313725490196076" blue="0.50980392156862742" alpha="1"/> <color name="Overview Selected Foreground" red="0.17647058823529413" green="0.17647058823529413" blue="0.17647058823529413" alpha="1"/>@@ -47,6 +47,7 @@ <color name="Overview Item 1" red="0.92549019607843142" green="0.92549019607843142" blue="0.92549019607843142" alpha="1"/> <color name="Cubic Control Point" red="0.45490196078431372" green="0.45490196078431372" blue="0.45490196078431372" alpha="1"/> <color name="Selected Active Quadratic Control Point" red="0.91764705882352937" green="0.30196078431372547" blue="0.10196078431372549" alpha="1"/>+ <color name="Active Handle" red="0.082352941176470587" green="0.17254901960784313" blue="0.098039215686274508" alpha="1"/> <color name="Overview Item 2" red="0.96470588235294119" green="0.96470588235294119" blue="0.96470588235294119" alpha="1"/> <color name="Selected Button Foreground" red="0.41960784313725491" green="0.4392156862745098" blue="0.47843137254901963" alpha="1"/> <color name="Active Spin Button" red="0.41960784313725491" green="0.4392156862745098" blue="0.47843137254901963" alpha="1"/>@@ -62,7 +63,6 @@ <color name="Checkbox Background" red="0.396078431372549" green="0.42352941176470588" blue="0.45490196078431372" alpha="1"/> <color name="Active Cubic Control Point" red="0.27450980392156865" green="0.27450980392156865" blue="0.27450980392156865" alpha="1"/> <color name="Foreground 1" red="0" green="0" blue="0" alpha="1"/>- <color name="Active Control Point Handle" red="0.31764705882352939" green="0.57647058823529407" blue="0.35294117647058826" alpha="1"/> <color name="Merge" red="0.65490196078431373" green="0.66666666666666663" blue="0.69803921568627447" alpha="0.29999999999999999"/> <color name="Headline Background" red="0.396078431372549" green="0.42352941176470588" blue="0.45490196078431372" alpha="1"/> <color name="Overview Selected Foreground" red="0.17647058823529413" green="0.17647058823529413" blue="0.17647058823529413" alpha="1"/>@@ -47,6 +47,7 @@ <color name="Overview Item 1" red="1" green="1" blue="1" alpha="1"/> <color name="Cubic Control Point" red="0" green="0" blue="0" alpha="1"/> <color name="Selected Active Quadratic Control Point" red="0" green="0" blue="0" alpha="1"/>+ <color name="Active Handle" red="0" green="0" blue="0" alpha="1"/> <color name="Overview Item 2" red="1" green="1" blue="1" alpha="1"/> <color name="Selected Button Foreground" red="1" green="1" blue="1" alpha="1"/> <color name="Active Spin Button" red="0" green="0" blue="0" alpha="1"/>@@ -62,7 +63,6 @@ <color name="Checkbox Background" red="1" green="1" blue="1" alpha="1"/> <color name="Active Cubic Control Point" red="0" green="0" blue="0" alpha="1"/> <color name="Foreground 1" red="0" green="0" blue="0" alpha="1"/>- <color name="Active Control Point Handle" red="0" green="0" blue="0" alpha="1"/> <color name="Merge" red="0" green="0" blue="0" alpha="1"/> <color name="Headline Background" red="0" green="0" blue="0" alpha="1"/> <color name="Overview Selected Foreground" red="1" green="1" blue="1" alpha="1"/>