fix central panel frame

This commit is contained in:
Simon Gardling 2022-04-22 00:58:47 -04:00
parent 29c21bb601
commit f9073c5a11

View File

@ -1,11 +1,14 @@
use crate::consts::*; use crate::consts::*;
use crate::function_entry::{FunctionEntry, Riemann, DEFAULT_FUNCTION_ENTRY}; use crate::function_entry::{FunctionEntry, Riemann, DEFAULT_FUNCTION_ENTRY};
use crate::misc::{dyn_mut_iter, option_vec_printer, JsonFileOutput, SerdeValueHelper}; use crate::misc::{dyn_mut_iter, option_vec_printer, JsonFileOutput, SerdeValueHelper};
use egui::style::Margin;
use egui::Frame;
use egui::{ use egui::{
plot::Plot, vec2, Button, CentralPanel, Color32, ComboBox, Context, FontData, FontDefinitions, plot::Plot, vec2, Button, CentralPanel, Color32, ComboBox, Context, FontData, FontDefinitions,
FontFamily, Key, RichText, SidePanel, Slider, TopBottomPanel, Vec2, Visuals, Window, FontFamily, Key, RichText, SidePanel, Slider, TopBottomPanel, Vec2, Visuals, Window,
}; };
use emath::Align2; use emath::Align2;
use epaint::Rounding;
use instant::Duration; use instant::Duration;
use std::collections::BTreeMap; use std::collections::BTreeMap;
use std::{io::Read, ops::BitXorAssign, str}; 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 // Central panel which contains the central plot (or an error created when
// parsing) // parsing)
CentralPanel::default() 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| { .show(ctx, |ui| {
// Display an error if it exists // Display an error if it exists
let errors_formatted: String = self let errors_formatted: String = self