mirror of
https://github.com/elementary/gala.git
synced 2024-12-24 17:53:19 +03:00
WindowSwitcher: Fix rounded corners (#1638)
This commit is contained in:
parent
c7f7b4de64
commit
3f4dfa6877
@ -21,6 +21,7 @@
|
||||
</description>
|
||||
<issues>
|
||||
<issue url="https://github.com/elementary/gala/issues/536">Enable "Alt + ~" to switch between windows of the same application</issue>
|
||||
<issue url="https://github.com/elementary/gala/issues/1355">Issue with rounded corners of window switcher</issue>
|
||||
</issues>
|
||||
</release>
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Copyright 2014 Gala Developers
|
||||
* Copyright 2022 elementary, Inc. (https://elementary.io)
|
||||
* Copyright 2022-2023 elementary, Inc. (https://elementary.io)
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -53,3 +53,12 @@
|
||||
0 3px 14px 2px alpha(#000, 0.12),
|
||||
0 5px 5px -3px alpha(#000, 0.4);
|
||||
}
|
||||
|
||||
.window-switcher.decoration {
|
||||
border-radius: 6px;
|
||||
box-shadow:
|
||||
0 0 0 1px alpha(#000, 0.2),
|
||||
0 8px 10px 1px alpha(#000, 0.14),
|
||||
0 3px 14px 2px alpha(#000, 0.12),
|
||||
0 5px 5px -3px alpha(#000, 0.4);
|
||||
}
|
||||
|
@ -56,10 +56,9 @@ namespace Gala {
|
||||
// Carry out the initial draw
|
||||
create_components ();
|
||||
|
||||
// FIXME: Kind of abusing the style class here for a smaller shadow
|
||||
var effect = new ShadowEffect (30) {
|
||||
var effect = new ShadowEffect (40) {
|
||||
shadow_opacity = 200,
|
||||
css_class = "workspace"
|
||||
css_class = "window-switcher"
|
||||
};
|
||||
|
||||
add_effect (effect);
|
||||
@ -91,6 +90,10 @@ namespace Gala {
|
||||
|
||||
private bool draw (Cairo.Context ctx, int width, int height) {
|
||||
ctx.save ();
|
||||
ctx.set_operator (Cairo.Operator.CLEAR);
|
||||
ctx.paint ();
|
||||
ctx.clip ();
|
||||
ctx.reset_clip ();
|
||||
|
||||
var widget_path = new Gtk.WidgetPath ();
|
||||
widget_path.append_type (typeof (Gtk.Window));
|
||||
@ -109,6 +112,7 @@ namespace Gala {
|
||||
style_context.add_provider (css_provider, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
|
||||
}
|
||||
|
||||
ctx.set_operator (Cairo.Operator.OVER);
|
||||
style_context.render_background (ctx, 0, 0, width, height);
|
||||
style_context.render_frame (ctx, 0, 0, width, height);
|
||||
ctx.restore ();
|
||||
|
Loading…
Reference in New Issue
Block a user