mirror of
https://code.gri.mw/GUI/grim.git
synced 2026-07-10 17:04:10 +00:00
qr: smaller text
This commit is contained in:
+9
-6
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user