Viewport frame-rate readout (Preferences ▸ Graphics) (#1580)

Thanks @sthifen.
This commit is contained in:
sthifen authored and GitHub committed 2026-10-15 22:50:41 -04:00
1 parent 904bf19e83
commit e21c5f06ac
11 files changed
+125 -1

No files matched your search

+11
View File
@@ -283,6 +283,8 @@ pub struct Prefs {
pub supersampling: f32,
/// Supersample only while the view holds still (full speed while orbiting).
pub supersampling_adaptive: bool,
/// Show the frame rate in the view's corner (the view then redraws every frame).
pub show_frame_rate: bool,
/// Show world X/Y/Z component dimensions beside the total distance in Measure.
pub measure_axis_distances: bool,
/// Decimals shown for lengths and angles.
@@ -400,6 +402,7 @@ impl Default for Prefs {
display_quality: "normal".into(),
supersampling: 1.0,
supersampling_adaptive: true,
show_frame_rate: false,
measure_axis_distances: true,
length_decimals: 2,
angle_decimals: 1,
@@ -624,6 +627,7 @@ fn defaults(app: &mut SolveApp, page: usize) {
p.display_quality = d.display_quality;
p.supersampling = d.supersampling;
p.supersampling_adaptive = d.supersampling_adaptive;
p.show_frame_rate = d.show_frame_rate;
p.measure_axis_distances = d.measure_axis_distances;
p.color_vision = d.color_vision;
app.ui.visual_style = 0;
@@ -1310,6 +1314,13 @@ fn page(app: &mut SolveApp, ui: &mut egui::Ui, t: &Tokens) {
colour_vision_sample(ui, t);
ui.end_row();
note(ui, app.tr("ui.colour_vision_note"));
// Last, so the colour vision section above keeps its place on the page.
ui.label("");
ui.end_row();
ui.label(app.tr("ui.frame_rate"));
ui.checkbox(&mut app.preferences.show_frame_rate, "");
ui.end_row();
note(ui, app.tr("settings.frame_rate_note"));
}
5 => {
ui.label(crate::i18n::tr_label("Project face edges into new sketches"));