Commit 3d2d3dc
New color for the version menu
Changed files (2)
Diff
@@ -193,50 +193,32 @@ public class DropMenu : GLib.Object { public void draw_menu (Context cr) { double ix, iy; int n;+ Pattern gradient; if (likely (!menu_visible)) { return; } cr.save ();- cr.set_source_rgba (122/255.0, 150/255.0, 169/255.0, 1);- cr.set_line_join (LineJoin.ROUND);- cr.set_line_width (12);- - if (direction == MenuDirection.DROP_DOWN) {- cr.rectangle (menu_x, y + 18, 88, actions.size * item_height - 12);- } else {- cr.rectangle (menu_x, y + 6 - actions.size * item_height, 88, actions.size * item_height - 12);- }+ cr.set_source_rgba (177/255.0, 177/255.0, 177/255.0, 1);+ cr.set_line_width (0);+ + gradient = new Pattern.linear (menu_x, y - 3 * item_height, menu_x, y);+ gradient.add_color_stop_rgb (0, 177/255.0, 177/255.0, 177/255.0);+ gradient.add_color_stop_rgb (1, 234/255.0, 234/255.0, 234/255.0);+ + cr.set_source (gradient);+ cr.rectangle (menu_x, y - actions.size * item_height, 94, actions.size * item_height); cr.fill_preserve (); cr.stroke (); cr.restore (); - // fill the lower right corner- if (direction != MenuDirection.DROP_DOWN) {- cr.save ();- cr.set_source_rgba (122/255.0, 150/255.0, 169/255.0, 1);- cr.set_line_width (0); - - cr.rectangle (menu_x, y - 7, 13, 7);-- cr.fill_preserve ();- cr.stroke ();- cr.restore ();- }- cr.save (); n = 0; foreach (MenuAction item in actions) {- - if (direction == MenuDirection.DROP_DOWN) {- iy = y + 33 + n * item_height - 5;- } else {- iy = y - 8 - n * item_height;- }- + iy = y - 8 - n * item_height; ix = menu_x + 2; item.draw (ix, iy, cr);@@ -256,7 +238,7 @@ public class DropMenu : GLib.Object { cr.save (); - cr.set_source_rgba (122/255.0, 150/255.0, 169/255.0, alpha);+ cr.set_source_rgba (234/255.0, 234/255.0, 234/255.0, alpha); cr.rectangle (x, y, 12, 12); cr.fill_preserve ();@@ -43,10 +43,8 @@ public class MenuAction : GLib.Object { if (selected) { cr.save ();- cr.set_line_join (LineJoin.ROUND);- cr.set_line_width (12);- cr.set_source_rgba (102/255.0, 120/255.0, 149/255.0, 1);- cr.rectangle (x - 2, y - 9, 88, 8);+ cr.set_source_rgba (234/255.0, 234/255.0, 234/255.0, 1);+ cr.rectangle (x - 2, y - 12, 93, 15); cr.fill_preserve (); cr.stroke (); cr.restore (); @@ -61,7 +59,7 @@ public class MenuAction : GLib.Object { } cr.save ();- cr.set_source_rgba (1, 1, 1, 1);+ cr.set_source_rgba (0, 0, 0, 1); cr.set_font_size (12); cr.select_font_face ("Cantarell", FontSlant.NORMAL, FontWeight.NORMAL);