mirror of
https://github.com/elementary/gala.git
synced 2024-11-30 19:27:01 +03:00
try to fix drawing
This commit is contained in:
parent
8e02d3f552
commit
7cbba07691
@ -313,26 +313,31 @@ namespace Gala.Plugins.Notify
|
|||||||
|
|
||||||
var buffer = new Granite.Drawing.BufferSurface (canvas.width, canvas.height);
|
var buffer = new Granite.Drawing.BufferSurface (canvas.width, canvas.height);
|
||||||
var cr = buffer.context;
|
var cr = buffer.context;
|
||||||
Granite.Drawing.Utilities.cairo_rounded_rectangle (cr, x, y, width, height, 5);
|
Granite.Drawing.Utilities.cairo_rounded_rectangle (cr, x - 0.5 , y - 0.5, width + 1, height + 1, 4);
|
||||||
|
|
||||||
cr.set_source_rgba (0, 0, 0, 0.6);
|
cr.set_source_rgba (0, 0, 0, 0.3);
|
||||||
cr.fill_preserve ();
|
cr.fill_preserve ();
|
||||||
buffer.exponential_blur (6);
|
buffer.exponential_blur (6);
|
||||||
|
|
||||||
cr.set_source_rgba (0, 0, 0, 0.1);
|
cr.set_source_rgba (0, 0, 0, 0.3);
|
||||||
cr.set_line_width (1);
|
cr.set_line_width (1);
|
||||||
cr.stroke ();
|
cr.stroke_preserve ();
|
||||||
|
|
||||||
Granite.Drawing.Utilities.cairo_rounded_rectangle (cr, x + 1, y + 1, width - 2, height - 2, 5);
|
Granite.Drawing.Utilities.cairo_rounded_rectangle (cr, x, y, width, height, 4);
|
||||||
cr.set_source_rgb (0.945, 0.945, 0.945);
|
cr.set_source_rgb (0.945, 0.945, 0.945);
|
||||||
cr.fill_preserve ();
|
cr.fill_preserve ();
|
||||||
|
cr.set_source_rgba (0, 0, 0, 0.0);
|
||||||
|
cr.stroke_preserve ();
|
||||||
|
|
||||||
var gradient = new Cairo.Pattern.linear (0, 0, 0, height - 2);
|
// var gradient = new Cairo.Pattern.linear (0, 0, 0, height - 2);
|
||||||
gradient.add_color_stop_rgba (0, 1, 1, 1, 1.0);
|
// gradient.add_color_stop_rgba (0, 1, 1, 1, 1.0);
|
||||||
gradient.add_color_stop_rgba (1, 1, 1, 1, 0.6);
|
// gradient.add_color_stop_rgba (1, 1, 1, 1, 0.6);
|
||||||
|
// cr.set_source (gradient);
|
||||||
|
|
||||||
cr.set_source (gradient);
|
Granite.Drawing.Utilities.cairo_rounded_rectangle (cr, x + 0.5, y + 0.5, width - 1, height - 1, 3);
|
||||||
cr.stroke ();
|
cr.set_source_rgba (1, 0, 0, 0.3);
|
||||||
|
cr.set_line_width (1);
|
||||||
|
cr.stroke_preserve ();
|
||||||
|
|
||||||
// TODO move buffer out and optimize content drawing
|
// TODO move buffer out and optimize content drawing
|
||||||
draw_content (cr);
|
draw_content (cr);
|
||||||
|
Loading…
Reference in New Issue
Block a user