diff --git a/src/gui/views/network/network.rs b/src/gui/views/network/network.rs index d5d2e1f..1ac6390 100644 --- a/src/gui/views/network/network.rs +++ b/src/gui/views/network/network.rs @@ -117,18 +117,7 @@ impl Network { }); } - egui::TopBottomPanel::top("network_title") - .exact_height(TitlePanel::DEFAULT_HEIGHT) - .resizable(false) - .frame(egui::Frame { - fill: Colors::YELLOW, - inner_margin: Margin::same(0.0), - outer_margin: Margin::same(0.0), - ..Default::default() - }) - .show_inside(ui, |ui| { - self.title_ui(ui, frame); - }); + self.title_ui(ui, frame); egui::TopBottomPanel::bottom("network_tabs") .frame(egui::Frame { diff --git a/src/gui/views/title_panel.rs b/src/gui/views/title_panel.rs index 5ceff66..40fe6ab 100644 --- a/src/gui/views/title_panel.rs +++ b/src/gui/views/title_panel.rs @@ -41,7 +41,7 @@ pub enum TitleType { pub struct TitlePanel; impl TitlePanel { - pub const DEFAULT_HEIGHT: f32 = 52.0; + pub const DEFAULT_HEIGHT: f32 = 54.0; pub fn ui(title: TitleType, l: Option, r: Option, ui: &mut egui::Ui) { let id = match &title { @@ -104,6 +104,7 @@ impl TitlePanel { builder .size(Size::remainder()) .size(Size::exact(30.0)) + .size(Size::exact(2.0)) .vertical(|mut strip| { strip.cell(|ui| { ui.add_space(4.0); @@ -131,8 +132,8 @@ impl TitlePanel { ui.ctx().request_repaint(); } }); - ui.add_space(2.0); }); + strip.empty(); }); } }