Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Round corners of workspaces in multitasking view #1734

Merged
merged 10 commits into from
Dec 18, 2023
1 change: 1 addition & 0 deletions data/gala.css
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
}

.workspace.decoration {
border-radius: 6px;
box-shadow:
0 0 0 1px alpha(#000, 0.2),
0 8px 10px 1px alpha(#000, 0.14),
Expand Down
10 changes: 9 additions & 1 deletion src/Background/BackgroundManager.vala
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,22 @@ public class Gala.BackgroundManager : Meta.BackgroundGroup {
unowned var content = (Meta.BackgroundContent) background_actor.content;
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) {
content.vignette = true;
content.brightness = DIM_OPACITY;
}

insert_child_below (background_actor, null);

var monitor = display.get_monitor_geometry (monitor_index);
background_actor.set_size (monitor.width, monitor.height);

ulong changed_handler = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/Widgets/WorkspaceClone.vala
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ namespace Gala {
var ctx = cached_context;

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.stroke ();
ctx.restore ();
Expand Down