mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Small code cleanup
This commit is contained in:
@@ -37,13 +37,6 @@ impl Resource {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, PartialEq, Copy, Clone)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||
enum Method {
|
||||
Get,
|
||||
Post,
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||
pub struct HttpApp {
|
||||
url: String,
|
||||
|
||||
@@ -35,6 +35,13 @@ impl epi::App for EasyMarkEditor {
|
||||
}
|
||||
|
||||
fn update(&mut self, ctx: &egui::CtxRef, _frame: &mut epi::Frame<'_>) {
|
||||
egui::TopBottomPanel::bottom("easy_mark_bottom").show(ctx, |ui| {
|
||||
let layout = egui::Layout::top_down(egui::Align::Center).with_main_justify(true);
|
||||
ui.allocate_ui_with_layout(ui.available_size(), layout, |ui| {
|
||||
ui.add(crate::__egui_github_link_file!())
|
||||
})
|
||||
});
|
||||
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
self.ui(ui);
|
||||
});
|
||||
@@ -49,7 +56,6 @@ impl EasyMarkEditor {
|
||||
ui.end_row();
|
||||
|
||||
ui.checkbox(&mut self.show_rendered, "Show rendered");
|
||||
ui.add(crate::__egui_github_link_file!());
|
||||
});
|
||||
|
||||
ui.separator();
|
||||
|
||||
@@ -270,7 +270,6 @@ impl CodeTheme {
|
||||
});
|
||||
|
||||
ui.add_space(16.0);
|
||||
// ui.separator(); // TODO: fix forever-expand
|
||||
|
||||
ui.memory().data.insert(selected_tt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user