mirror of
https://github.com/storytold/figcraft.git
synced 2026-10-24 10:27:00 -06:00
Merge fix/772 into batch 17
This commit is contained in:
@@ -1788,8 +1788,7 @@ fn navigation_bar(p: &mut Presenter, ctx: &egui::Context, now: f64) -> Option<St
|
||||
let scale_menu = ui.menu_button(format!("{} ", tr(p.view.scale.label(settings.device().is_some()))), |ui| {
|
||||
navigation_menu(ui, |ui| {
|
||||
for scale in PresentScale::options(settings.device().is_some()) {
|
||||
let label = egui::RichText::new(tr(scale.label(settings.device().is_some()))).color(t.menu_text);
|
||||
if ui.selectable_label(p.view.scale == *scale, label).clicked() {
|
||||
if ui.selectable_label(p.view.scale == *scale, tr(scale.label(settings.device().is_some()))).clicked() {
|
||||
p.set_scale(*scale);
|
||||
ui.close();
|
||||
}
|
||||
@@ -1812,15 +1811,8 @@ fn paint_menu_chevron(painter: &egui::Painter, button: Rect, color: Color32) {
|
||||
}
|
||||
|
||||
fn navigation_menu(ui: &mut Ui, add: impl FnOnce(&mut Ui)) {
|
||||
let t = Tokens::get(ui.ctx());
|
||||
ui.visuals_mut().override_text_color = Some(t.menu_text);
|
||||
egui::Frame::NONE.fill(t.menu).stroke(Stroke::new(1.0, t.border)).corner_radius(CornerRadius::same(7)).inner_margin(egui::Margin::same(6)).show(
|
||||
ui,
|
||||
|ui| {
|
||||
ui.set_min_width(212.0);
|
||||
add(ui);
|
||||
},
|
||||
);
|
||||
ui.set_min_width(212.0);
|
||||
add(ui);
|
||||
}
|
||||
|
||||
/// How often the player polls the controllers while its prototype has gamepad triggers (seconds).
|
||||
|
||||
Reference in New Issue
Block a user