mirror of
https://github.com/elementary/gala.git
synced 2024-12-25 02:02:11 +03:00
Fix notifications position after DPI switch (#564)
This commit is contained in:
parent
589884570b
commit
4a07494ad6
@ -31,6 +31,15 @@ namespace Gala.Plugins.Notify
|
|||||||
|
|
||||||
public Screen screen { get; construct; }
|
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)
|
public NotificationStack (Screen screen)
|
||||||
{
|
{
|
||||||
Object (screen: screen);
|
Object (screen: screen);
|
||||||
@ -38,8 +47,6 @@ namespace Gala.Plugins.Notify
|
|||||||
|
|
||||||
construct
|
construct
|
||||||
{
|
{
|
||||||
var scale = Utils.get_ui_scaling_factor ();
|
|
||||||
width = (Notification.WIDTH + 2 * Notification.MARGIN + ADDITIONAL_MARGIN) * scale;
|
|
||||||
clip_to_allocation = true;
|
clip_to_allocation = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user