Add text fixes

This commit is contained in:
darktohka
2026-03-17 03:10:47 +02:00
parent adc456b8f6
commit 202e2c160f
16 changed files with 143 additions and 140 deletions
@@ -35,7 +35,10 @@ fn main() {
let mut renderer = Renderer::new(phys_w, phys_h);
let mut form = UninstallForm::new(scale);
while window.is_open() && !window.is_key_down(Key::Escape) {
while window.is_open() && !window.is_key_down(Key::Escape)
&& !(window.is_key_down(Key::F4)
&& (window.is_key_down(Key::LeftAlt) || window.is_key_down(Key::RightAlt)))
{
let (mx, my) = window
.get_mouse_pos(MouseMode::Clamp)
.unwrap_or((0.0, 0.0));
@@ -71,6 +71,7 @@ impl UninstallForm {
let lbl = |x: i32, y: i32, text: &str, size: f32| {
let mut l = Label::new(s(x), s(y), text, sf(size));
l.line_spacing = sf(2.0);
l.max_width = sf((WIDTH as i32 - x - 10) as f32);
l
};
let btn = |x: i32, y: i32, w: i32, h: i32, text: &str| GradientButton {
@@ -191,6 +192,7 @@ The following details could be useful. Press the Retry button to try again.",
self.sf(11.0),
FG_COLOR,
self.sf(1.0),
self.sf((WIDTH as i32 - PANEL_X - 14) as f32),
);
self.copy_error_button.draw(renderer, &self.fonts);
}
@@ -229,10 +231,10 @@ The following details could be useful. Press the Retry button to try again.",
redirection::enable_redirection(redir);
let mut state = progress.lock().unwrap();
state.done = true;
if let Err(e) = result {
state.error = Some(e.to_string());
}
state.done = true;
});
}