Round corners of workspaces in multitasking view (#1734)

This commit is contained in:
Leo 2023-12-19 04:45:45 +09:00 committed by GitHub
parent a4a3fa5bdd
commit fa8ebfd0be
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 2 deletions

View File

@ -46,6 +46,7 @@
} }
.workspace.decoration { .workspace.decoration {
border-radius: 6px;
box-shadow: box-shadow:
0 0 0 1px alpha(#000, 0.2), 0 0 0 1px alpha(#000, 0.2),
0 8px 10px 1px alpha(#000, 0.14), 0 8px 10px 1px alpha(#000, 0.14),

View File

@ -117,6 +117,15 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup {
unowned var content = (Meta.BackgroundContent) background_actor.content; unowned var content = (Meta.BackgroundContent) background_actor.content;
content.background = background.background; content.background = background.background;
var monitor = display.get_monitor_geometry (monitor_index);
var rect = Graphene.Rect () {
origin = {monitor.x, monitor.y},
size = {monitor.width, monitor.height},
};
content.set_rounded_clip_bounds (rect);
content.rounded_clip_radius = Utils.scale_to_int (6, display.get_monitor_scale (monitor_index));
if (background_source.should_dim) { if (background_source.should_dim) {
content.vignette = true; content.vignette = true;
content.brightness = DIM_OPACITY; content.brightness = DIM_OPACITY;
@ -124,7 +133,6 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup {
insert_child_below (background_actor, null); insert_child_below (background_actor, null);
var monitor = display.get_monitor_geometry (monitor_index);
background_actor.set_size (monitor.width, monitor.height); background_actor.set_size (monitor.width, monitor.height);
ulong changed_handler = 0; ulong changed_handler = 0;

View File

@ -63,7 +63,7 @@ namespace Gala {
var ctx = cached_context; var ctx = cached_context;
ctx.set_source_rgba (255, 255, 255, 255); ctx.set_source_rgba (255, 255, 255, 255);
ctx.rectangle (0, 0, (int) width, (int) height); Drawing.Utilities.cairo_rounded_rectangle (ctx, 0, 0, width, height, 9);
ctx.set_operator (Cairo.Operator.SOURCE); ctx.set_operator (Cairo.Operator.SOURCE);
ctx.stroke (); ctx.stroke ();
ctx.restore (); ctx.restore ();