Clone in a terminal:
Commit 0ca1056
Johan Mattsson - 2015-06-20T12:40:58+00:00
0ca10561e2edd3eb45b8bbe8fa1b6297791f6f7djohan.mattsson.m@gmail.com

Color for active control point handle

Changed files (7)

Diff

diff --git a/libbirdfont/Glyph.vala b/libbirdfont/Glyph.valaindex 6cc9d0b..6223b0d 100644--- a/libbirdfont/Glyph.vala+++ b/libbirdfont/Glyph.vala@@ -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 ();diff --git a/libbirdfont/Path.vala b/libbirdfont/Path.valaindex 28da126..a28ab7a 100644--- a/libbirdfont/Path.vala+++ b/libbirdfont/Path.vala@@ -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);diff --git a/libbirdfont/PenTool.vala b/libbirdfont/PenTool.valaindex 6e47b0e..47fcd13 100644--- a/libbirdfont/PenTool.vala+++ b/libbirdfont/PenTool.vala@@ -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; 	} diff --git a/libbirdfont/Theme.vala b/libbirdfont/Theme.valaindex 9b5ca84..90cea5d 100644--- a/libbirdfont/Theme.vala+++ b/libbirdfont/Theme.vala@@ -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");diff --git a/resources/bright.theme b/resources/bright.themeindex 54786c9..bf173cf 100644--- a/resources/bright.theme+++ b/resources/bright.theme@@ -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"/>diff --git a/resources/dark.theme b/resources/dark.themeindex e566419..3baa5f0 100644--- a/resources/dark.theme+++ b/resources/dark.theme@@ -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"/>diff --git a/resources/high_contrast.theme b/resources/high_contrast.themeindex ffea114..25a1968 100644--- a/resources/high_contrast.theme+++ b/resources/high_contrast.theme@@ -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"/>

Contact

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