Fix notifications position after DPI switch (#564)

This commit is contained in:
Peter Uithoven 2019-10-30 00:09:21 +01:00 committed by Adam Bieńkowski
parent 589884570b
commit 4a07494ad6

View File

@ -31,6 +31,15 @@ namespace Gala.Plugins.Notify
public Screen screen { get; construct; }
public new float width
{
get
{
var scale = Utils.get_ui_scaling_factor ();
return (Notification.WIDTH + 2 * Notification.MARGIN + ADDITIONAL_MARGIN) * scale;
}
}
public NotificationStack (Screen screen)
{
Object (screen: screen);
@ -38,8 +47,6 @@ namespace Gala.Plugins.Notify
construct
{
var scale = Utils.get_ui_scaling_factor ();
width = (Notification.WIDTH + 2 * Notification.MARGIN + ADDITIONAL_MARGIN) * scale;
clip_to_allocation = true;
}