Skip to content

Commit cbb130e

Browse files
committed
Scale active shape with monitor scale
1 parent 3e37a51 commit cbb130e

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

src/Widgets/MultitaskingView/WindowClone.vala

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ public class Gala.WindowClone : ActorTarget, RootTarget {
129129

130130
active_shape = new ActiveShape ();
131131
active_shape.opacity = 0;
132+
bind_property ("monitor-scale", active_shape, "monitor-scale", SYNC_CREATE);
132133

133134
clone_container = new Clutter.Actor () {
134135
pivot_point = { 0.5f, 0.5f }
@@ -624,8 +625,17 @@ public class Gala.WindowClone : ActorTarget, RootTarget {
624625
private const int BORDER_RADIUS = 16;
625626
private const double COLOR_OPACITY = 0.8;
626627

628+
public float monitor_scale {
629+
set {
630+
rounded_corners_effect.monitor_scale = value;
631+
}
632+
}
633+
634+
private RoundedCornersEffect rounded_corners_effect;
635+
627636
construct {
628-
add_effect (new RoundedCornersEffect (BORDER_RADIUS, 1.0f));
637+
rounded_corners_effect = new RoundedCornersEffect (BORDER_RADIUS, 1.0f);
638+
add_effect (rounded_corners_effect);
629639
}
630640

631641
public void update_color () {

0 commit comments

Comments
 (0)