mirror of
https://github.com/elementary/gala.git
synced 2024-12-25 02:02:11 +03:00
Multitasking view: Ajust window icon on scaling factor change
This commit is contained in:
parent
4be64574c0
commit
c0506cb99b
@ -883,14 +883,16 @@ namespace Gala {
|
||||
|
||||
private void set_window_icon_position (float window_width, float window_height, bool aligned = true) {
|
||||
var scale_factor = InternalUtils.get_ui_scaling_factor ();
|
||||
var x = (window_width - WINDOW_ICON_SIZE) / 2;
|
||||
var y = window_height - (WINDOW_ICON_SIZE * scale_factor) * 0.75f;
|
||||
var size = WINDOW_ICON_SIZE * scale_factor;
|
||||
var x = (window_width - size) / 2;
|
||||
var y = window_height - (size * 0.75f);
|
||||
|
||||
if (aligned) {
|
||||
x = InternalUtils.pixel_align (x);
|
||||
y = InternalUtils.pixel_align (y);
|
||||
}
|
||||
|
||||
window_icon.set_size (size, size);
|
||||
window_icon.set_position (x, y);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user