diff options
| author | David Lönnhager <david.l@mullvad.net> | 2025-03-04 09:14:41 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2025-03-05 23:32:51 +0100 |
| commit | bb47a0e6bad55ad70c17c2f841f0c617ea8c430a (patch) | |
| tree | 2d5a9f002cad0ec19dc2130fb9701a7834ca811b | |
| parent | 8ae3b64a9b09aa762bc9cecc950949f1e7a423de (diff) | |
| download | mullvadvpn-bb47a0e6bad55ad70c17c2f841f0c617ea8c430a.tar.xz mullvadvpn-bb47a0e6bad55ad70c17c2f841f0c617ea8c430a.zip | |
Compute position of error view button
| -rw-r--r-- | installer-downloader/src/winapi_impl/ui.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/installer-downloader/src/winapi_impl/ui.rs b/installer-downloader/src/winapi_impl/ui.rs index 1f542fd161..a59d499fb2 100644 --- a/installer-downloader/src/winapi_impl/ui.rs +++ b/installer-downloader/src/winapi_impl/ui.rs @@ -105,19 +105,18 @@ impl ErrorView { .position((34, 49)) .build(&mut self.error_icon)?; - // TODO: put buttons 24px below bottom edge of text label - let text_bottom_y = 96; // TODO - let button_top_y = text_bottom_y + 24; + let button_y = + self.error_text.position().1 + i32::try_from(self.error_text.size().1).unwrap() + 11; nwg::Button::builder() .parent(&self.error_frame) - .position((304, button_top_y)) + .position((304, button_y)) .size((232, 32)) .build(&mut self.error_cancel_button)?; nwg::Button::builder() .parent(&self.error_frame) - .position((64, button_top_y)) + .position((64, button_y)) .size((232, 32)) .build(&mut self.error_retry_button)?; |
