qr: smaller text

This commit is contained in:
ardocrat
2025-06-02 21:54:13 +03:00
parent e067a0a900
commit 0fa2ef4283
+9 -6
View File
@@ -123,9 +123,7 @@ impl QrCodeContent {
self.qr_image_ui(svg, ui);
// Show QR code text.
ui.add_space(6.0);
View::ellipsize_text(ui, self.text.clone(), 16.0, Colors::inactive_text());
ui.add_space(6.0);
self.text_ui(ui);
ui.vertical_centered(|ui| {
let sharing = {
@@ -216,9 +214,7 @@ impl QrCodeContent {
self.qr_image_ui(svg, ui);
// Show QR code text.
ui.add_space(6.0);
View::ellipsize_text(ui, self.text.clone(), 16.0, Colors::inactive_text());
ui.add_space(6.0);
self.text_ui(ui);
// Setup spacing between buttons.
ui.spacing_mut().item_spacing = egui::Vec2::new(6.0, 0.0);
@@ -298,6 +294,13 @@ impl QrCodeContent {
});
}
/// Draw QR code text.
fn text_ui(&self, ui: &mut egui::Ui) {
ui.add_space(6.0);
View::ellipsize_text(ui, self.text.clone(), 15.0, Colors::inactive_text());
ui.add_space(6.0);
}
/// Check if QR code is loading.
fn loading(&self) -> bool {
let r_state = self.qr_image_state.read();