ui: add some margin to chrome sidebar
Looks a bit better
This commit is contained in:
@@ -268,6 +268,9 @@ impl Chrome {
|
||||
// minimize/close buttons
|
||||
if cfg!(target_os = "macos") {
|
||||
ui.add_space(28.0);
|
||||
} else {
|
||||
// we still want *some* padding so that it aligns with the + button regardless
|
||||
ui.add_space(notedeck_ui::constants::FRAME_MARGIN.into());
|
||||
}
|
||||
|
||||
if ui.add(expand_side_panel_button()).clicked() {
|
||||
|
||||
@@ -66,7 +66,8 @@ impl<'a> DesktopSidePanel<'a> {
|
||||
}
|
||||
|
||||
pub fn show(&mut self, ui: &mut egui::Ui) -> Option<SidePanelResponse> {
|
||||
let frame = egui::Frame::new().inner_margin(Margin::same(8));
|
||||
let frame =
|
||||
egui::Frame::new().inner_margin(Margin::same(notedeck_ui::constants::FRAME_MARGIN));
|
||||
|
||||
if !ui.visuals().dark_mode {
|
||||
let rect = ui.available_rect_before_wrap();
|
||||
|
||||
2
crates/notedeck_ui/src/constants.rs
Normal file
2
crates/notedeck_ui/src/constants.rs
Normal file
@@ -0,0 +1,2 @@
|
||||
/// Default frame margin
|
||||
pub const FRAME_MARGIN: i8 = 8;
|
||||
@@ -1,5 +1,6 @@
|
||||
mod anim;
|
||||
pub mod colors;
|
||||
pub mod constants;
|
||||
pub mod gif;
|
||||
pub mod icons;
|
||||
pub mod images;
|
||||
|
||||
Reference in New Issue
Block a user