aboutsummaryrefslogtreecommitdiff
path: root/src/ui/hotkey_overlay.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/hotkey_overlay.rs')
-rw-r--r--src/ui/hotkey_overlay.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ui/hotkey_overlay.rs b/src/ui/hotkey_overlay.rs
index e93dcb30..5fef2821 100644
--- a/src/ui/hotkey_overlay.rs
+++ b/src/ui/hotkey_overlay.rs
@@ -18,7 +18,7 @@ use crate::input::CompositorMod;
use crate::render_helpers::primary_gpu_texture::PrimaryGpuTextureRenderElement;
use crate::render_helpers::renderer::NiriRenderer;
use crate::render_helpers::texture::{TextureBuffer, TextureRenderElement};
-use crate::utils::{apply_scale, output_size};
+use crate::utils::{output_size, to_physical_precise_round};
const PADDING: i32 = 8;
// const MARGIN: i32 = PADDING * 2;
@@ -134,8 +134,8 @@ fn render(
let _span = tracy_client::span!("hotkey_overlay::render");
// let margin = MARGIN * scale;
- let padding = apply_scale(scale, PADDING);
- let line_interval = apply_scale(scale, LINE_INTERVAL);
+ let padding: i32 = to_physical_precise_round(scale, PADDING);
+ let line_interval: i32 = to_physical_precise_round(scale, LINE_INTERVAL);
// FIXME: if it doesn't fit, try splitting in two columns or something.
// let mut target_size = output_size;
@@ -245,7 +245,7 @@ fn render(
.collect::<Vec<_>>();
let mut font = FontDescription::from_string(FONT);
- font.set_absolute_size(apply_scale(scale, font.size()).into());
+ font.set_absolute_size(to_physical_precise_round(scale, font.size()));
let surface = ImageSurface::create(cairo::Format::ARgb32, 0, 0)?;
let cr = cairo::Context::new(&surface)?;