ui: fix window stroke

This commit is contained in:
ardocrat 2024-07-01 16:17:14 +03:00
parent f2a23ec0e0
commit 262cfdfca9
4 changed files with 24 additions and 32 deletions

View file

@ -79,12 +79,6 @@ impl NetworkContent {
.resizable(false) .resizable(false)
.exact_width(ui.available_width()) .exact_width(ui.available_width())
.frame(egui::Frame { .frame(egui::Frame {
outer_margin: Margin {
left: -0.5,
right: -0.5,
top: 0.0,
bottom: 0.0,
},
..Default::default() ..Default::default()
}) })
.show_animated_inside(ui, !show_connections, |ui| { .show_animated_inside(ui, !show_connections, |ui| {
@ -108,16 +102,6 @@ impl NetworkContent {
// Show connections content. // Show connections content.
egui::CentralPanel::default() egui::CentralPanel::default()
.frame(egui::Frame { .frame(egui::Frame {
outer_margin: if show_connections {
Margin {
left: -0.5,
right: -0.5,
top: 0.0,
bottom: -0.5,
}
} else {
Margin::ZERO
},
..Default::default() ..Default::default()
}) })
.show_inside(ui, |ui| { .show_inside(ui, |ui| {
@ -142,7 +126,7 @@ impl NetworkContent {
4.0 4.0
}, },
}, },
fill: Colors::fill(), fill: Colors::button(),
..Default::default() ..Default::default()
}) })
.show_inside(ui, |ui| { .show_inside(ui, |ui| {

View file

@ -14,7 +14,7 @@
use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::atomic::{AtomicBool, Ordering};
use egui::os::OperatingSystem; use egui::os::OperatingSystem;
use egui::{Align, Layout, RichText}; use egui::{Align, Layout, Margin, RichText};
use lazy_static::lazy_static; use lazy_static::lazy_static;
use crate::gui::Colors; use crate::gui::Colors;
@ -115,6 +115,16 @@ impl Root {
.resizable(false) .resizable(false)
.exact_width(panel_width) .exact_width(panel_width)
.frame(egui::Frame { .frame(egui::Frame {
outer_margin: Margin {
left: 0.0,
right: if dual_panel {
-0.5
} else {
0.0
},
top: 0.0,
bottom: 0.0,
},
..Default::default() ..Default::default()
}) })
.show_animated_inside(ui, is_panel_open, |ui| { .show_animated_inside(ui, is_panel_open, |ui| {

View file

@ -214,16 +214,6 @@ impl WalletsContent {
top: 3.0, top: 3.0,
bottom: 4.0, bottom: 4.0,
}, },
outer_margin: Margin {
left: 0.0,
right: if !wallet_panel_opened {
-0.5
} else {
0.0
},
top: 0.0,
bottom: 0.0,
},
..Default::default() ..Default::default()
} }
}) })

View file

@ -103,8 +103,12 @@ impl WalletContent {
bottom: 0.0, bottom: 0.0,
}, },
outer_margin: Margin { outer_margin: Margin {
left: -0.5, left: if dual_panel {
right: -0.5, -0.5
} else {
0.0
},
right: 0.0,
top: 0.0, top: 0.0,
bottom: if dual_panel { bottom: if dual_panel {
-1.0 -1.0
@ -152,8 +156,12 @@ impl WalletContent {
egui::CentralPanel::default() egui::CentralPanel::default()
.frame(egui::Frame { .frame(egui::Frame {
outer_margin: Margin { outer_margin: Margin {
left: -0.5, left: if dual_panel {
right: -0.5, -0.5
} else {
0.0
},
right: 0.0,
top: 0.0, top: 0.0,
bottom: 0.0, bottom: 0.0,
}, },