Improve visuals slightly
This commit is contained in:
31
src/app.rs
31
src/app.rs
@ -15,8 +15,8 @@ use crate::{
|
||||
util::{GuiSender, file_mtime, log_error},
|
||||
};
|
||||
use egui::{
|
||||
Align, Button, Context, FontData, FontDefinitions, FontFamily, FontId, Image, Key, Modifiers,
|
||||
PointerButton, RichText, ScrollArea, Theme, Widget, include_image,
|
||||
Align, Button, Context, FontData, FontDefinitions, FontFamily, FontId, Frame, Image, Key,
|
||||
Modifiers, PointerButton, RichText, ScrollArea, Theme, Widget, include_image,
|
||||
};
|
||||
use eyre::eyre;
|
||||
|
||||
@ -471,19 +471,24 @@ impl eframe::App for App {
|
||||
});
|
||||
});
|
||||
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
if let Some(Tab::File(file_editor)) = self
|
||||
.open_tab_index
|
||||
.and_then(|i| self.tabs.get_mut(i))
|
||||
.map(|(_tab_id, tab)| tab)
|
||||
{
|
||||
file_editor.show(ui, &self.preferences);
|
||||
}
|
||||
egui::CentralPanel::default()
|
||||
.frame(Frame {
|
||||
fill: ctx.style().visuals.window_fill(),
|
||||
..Frame::central_panel(&ctx.style())
|
||||
})
|
||||
.show(ctx, |ui| {
|
||||
if let Some(Tab::File(file_editor)) = self
|
||||
.open_tab_index
|
||||
.and_then(|i| self.tabs.get_mut(i))
|
||||
.map(|(_tab_id, tab)| tab)
|
||||
{
|
||||
file_editor.show(ui, &self.preferences);
|
||||
}
|
||||
|
||||
ui.with_layout(egui::Layout::bottom_up(Align::LEFT), |ui| {
|
||||
egui::warn_if_debug_build(ui);
|
||||
ui.with_layout(egui::Layout::bottom_up(Align::LEFT), |ui| {
|
||||
egui::warn_if_debug_build(ui);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user