diff options
| author | Ivan Molodetskikh <yalterz@gmail.com> | 2024-06-17 09:16:28 +0300 |
|---|---|---|
| committer | Ivan Molodetskikh <yalterz@gmail.com> | 2024-06-18 14:01:28 +0300 |
| commit | 1dae45c58d7eabeda21ef490d712915890bf6cff (patch) | |
| tree | 62c473ab1662a1161ed522517ea57b7bd8db340c /src/ui/config_error_notification.rs | |
| parent | 997119c44338ad96a40b4a1d6e958f77062a37ef (diff) | |
| download | niri-1dae45c58d7eabeda21ef490d712915890bf6cff.tar.gz niri-1dae45c58d7eabeda21ef490d712915890bf6cff.tar.bz2 niri-1dae45c58d7eabeda21ef490d712915890bf6cff.zip | |
Refactor layout to fractional-logical
Lets borders, gaps, and everything else stay pixel-perfect even with
fractional scale. Allows setting fractional border widths, gaps,
struts.
See the new wiki .md for more details.
Diffstat (limited to 'src/ui/config_error_notification.rs')
| -rw-r--r-- | src/ui/config_error_notification.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ui/config_error_notification.rs b/src/ui/config_error_notification.rs index 2def4b20..b120f494 100644 --- a/src/ui/config_error_notification.rs +++ b/src/ui/config_error_notification.rs @@ -144,7 +144,7 @@ impl ConfigErrorNotification { let size = buffer.logical_size(); let y_range = size.h + f64::from(PADDING) * 2.; - let x = (f64::from(output_size.w) - size.w).max(0.) / 2.; + let x = (output_size.w - size.w).max(0.) / 2.; let y = match &self.state { State::Hidden => unreachable!(), State::Showing(anim) | State::Hiding(anim) => -size.h + anim.value() * y_range, |
