|
@@ -78,39 +78,42 @@ impl KioskDashboard {
|
|
|
|
|
|
|
|
ui.allocate_ui_at_rect(content_rect, |ui| {
|
|
ui.allocate_ui_at_rect(content_rect, |ui| {
|
|
|
if self.borrow_flow.is_open {
|
|
if self.borrow_flow.is_open {
|
|
|
- // Apply component scale to workflows so they match kiosk UI
|
|
|
|
|
- let scale = if config.scale <= 0.0 { 1.0 } else { config.scale };
|
|
|
|
|
- ui.scope(|ui| {
|
|
|
|
|
- let mut style: egui::Style = ui.style().as_ref().clone();
|
|
|
|
|
- // Scale common text styles
|
|
|
|
|
- for (_ts, font) in style.text_styles.iter_mut() {
|
|
|
|
|
- font.size *= scale;
|
|
|
|
|
- }
|
|
|
|
|
- // Scale paddings and spacings
|
|
|
|
|
- style.spacing.item_spacing *= scale;
|
|
|
|
|
- style.spacing.button_padding *= scale;
|
|
|
|
|
- style.spacing.indent *= scale;
|
|
|
|
|
- style.spacing.window_margin = style.spacing.window_margin * scale;
|
|
|
|
|
- ui.set_style(style);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ // Apply optional view-level multiplier for reused desktop views
|
|
|
|
|
+ let vscale = config.view_scale_multiplier;
|
|
|
|
|
+ if (vscale - 1.0).abs() > f32::EPSILON {
|
|
|
|
|
+ ui.scope(|ui| {
|
|
|
|
|
+ let mut style: egui::Style = ui.style().as_ref().clone();
|
|
|
|
|
+ for (_ts, font) in style.text_styles.iter_mut() {
|
|
|
|
|
+ font.size *= vscale;
|
|
|
|
|
+ }
|
|
|
|
|
+ style.spacing.item_spacing *= vscale;
|
|
|
|
|
+ style.spacing.button_padding *= vscale;
|
|
|
|
|
+ style.spacing.indent *= vscale;
|
|
|
|
|
+ style.spacing.window_margin = style.spacing.window_margin * vscale;
|
|
|
|
|
+ ui.set_style(style);
|
|
|
|
|
+ self.borrow_flow.show_content(ui, api_client);
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
self.borrow_flow.show_content(ui, api_client);
|
|
self.borrow_flow.show_content(ui, api_client);
|
|
|
- });
|
|
|
|
|
|
|
+ }
|
|
|
} else if self.return_flow.is_open {
|
|
} else if self.return_flow.is_open {
|
|
|
- // Apply component scale to workflows so they match kiosk UI
|
|
|
|
|
- let scale = if config.scale <= 0.0 { 1.0 } else { config.scale };
|
|
|
|
|
- ui.scope(|ui| {
|
|
|
|
|
- let mut style: egui::Style = ui.style().as_ref().clone();
|
|
|
|
|
- for (_ts, font) in style.text_styles.iter_mut() {
|
|
|
|
|
- font.size *= scale;
|
|
|
|
|
- }
|
|
|
|
|
- style.spacing.item_spacing *= scale;
|
|
|
|
|
- style.spacing.button_padding *= scale;
|
|
|
|
|
- style.spacing.indent *= scale;
|
|
|
|
|
- style.spacing.window_margin = style.spacing.window_margin * scale;
|
|
|
|
|
- ui.set_style(style);
|
|
|
|
|
-
|
|
|
|
|
|
|
+ let vscale = config.view_scale_multiplier;
|
|
|
|
|
+ if (vscale - 1.0).abs() > f32::EPSILON {
|
|
|
|
|
+ ui.scope(|ui| {
|
|
|
|
|
+ let mut style: egui::Style = ui.style().as_ref().clone();
|
|
|
|
|
+ for (_ts, font) in style.text_styles.iter_mut() {
|
|
|
|
|
+ font.size *= vscale;
|
|
|
|
|
+ }
|
|
|
|
|
+ style.spacing.item_spacing *= vscale;
|
|
|
|
|
+ style.spacing.button_padding *= vscale;
|
|
|
|
|
+ style.spacing.indent *= vscale;
|
|
|
|
|
+ style.spacing.window_margin = style.spacing.window_margin * vscale;
|
|
|
|
|
+ ui.set_style(style);
|
|
|
|
|
+ self.return_flow.show_content(ui, api_client);
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
self.return_flow.show_content(ui, api_client);
|
|
self.return_flow.show_content(ui, api_client);
|
|
|
- });
|
|
|
|
|
|
|
+ }
|
|
|
} else {
|
|
} else {
|
|
|
self.show_dashboard_grid(ui, row_height, show_full_ui_requested, user, config, api_client);
|
|
self.show_dashboard_grid(ui, row_height, show_full_ui_requested, user, config, api_client);
|
|
|
}
|
|
}
|