From f9073c5a11d4b77d94a9181ad65ef3a965b171b8 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Fri, 22 Apr 2022 00:58:47 -0400 Subject: [PATCH] fix central panel frame --- src/math_app.rs | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/math_app.rs b/src/math_app.rs index 0d6340d..a3c7ffc 100644 --- a/src/math_app.rs +++ b/src/math_app.rs @@ -1,11 +1,14 @@ use crate::consts::*; use crate::function_entry::{FunctionEntry, Riemann, DEFAULT_FUNCTION_ENTRY}; use crate::misc::{dyn_mut_iter, option_vec_printer, JsonFileOutput, SerdeValueHelper}; +use egui::style::Margin; +use egui::Frame; use egui::{ plot::Plot, vec2, Button, CentralPanel, Color32, ComboBox, Context, FontData, FontDefinitions, FontFamily, Key, RichText, SidePanel, Slider, TopBottomPanel, Vec2, Visuals, Window, }; use emath::Align2; +use epaint::Rounding; use instant::Duration; use std::collections::BTreeMap; use std::{io::Read, ops::BitXorAssign, str}; @@ -531,7 +534,13 @@ impl epi::App for MathApp { // Central panel which contains the central plot (or an error created when // parsing) CentralPanel::default() - .frame(egui::Frame::none()) + .frame(Frame { + inner_margin: Margin::symmetric(0.0, 0.0), + rounding: Rounding::none(), + fill: ctx.style().visuals.window_fill(), + stroke: Default::default(), + ..Default::default() + }) .show(ctx, |ui| { // Display an error if it exists let errors_formatted: String = self