generated from PlexSheep/rs-base
Compare commits
No commits in common. "1e38e17f366699565ca7180496a5f83dda1c6cdb" and "23640a3fdfdeb90849f0b2718dff386922aa11ca" have entirely different histories.
1e38e17f36
...
23640a3fdf
4 changed files with 7 additions and 24 deletions
|
@ -23,11 +23,7 @@ eframe = { version = "0.28.1", optional = false }
|
||||||
egui = { version = "0.28.1", optional = false }
|
egui = { version = "0.28.1", optional = false }
|
||||||
egui_extras = { version = "0.28.1", features = ["image"] }
|
egui_extras = { version = "0.28.1", features = ["image"] }
|
||||||
human-panic = "2.0.1"
|
human-panic = "2.0.1"
|
||||||
image = { version = "0.25.2", default-features = true, features = [
|
image = "0.25.2"
|
||||||
"jpeg",
|
|
||||||
"png",
|
|
||||||
] }
|
|
||||||
|
|
||||||
libpt = { version = "0.6.0", features = ["cli", "full"] }
|
libpt = { version = "0.6.0", features = ["cli", "full"] }
|
||||||
thiserror = "1.0.63"
|
thiserror = "1.0.63"
|
||||||
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] }
|
||||||
|
|
|
@ -46,8 +46,8 @@ impl Player {
|
||||||
|
|
||||||
app.gui_options = eframe::NativeOptions {
|
app.gui_options = eframe::NativeOptions {
|
||||||
viewport: egui::ViewportBuilder::default()
|
viewport: egui::ViewportBuilder::default()
|
||||||
.with_inner_size([900.0, 700.0])
|
.with_inner_size([400.0, 300.0])
|
||||||
.with_min_inner_size([500.0, 320.0])
|
.with_min_inner_size([300.0, 220.0])
|
||||||
.with_icon(Player::load_icon()),
|
.with_icon(Player::load_icon()),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
};
|
};
|
||||||
|
|
|
@ -161,8 +161,6 @@ impl Player {
|
||||||
impl eframe::App for Player {
|
impl eframe::App for Player {
|
||||||
/// Called each time the UI needs repainting, which may be many times per second.
|
/// Called each time the UI needs repainting, which may be many times per second.
|
||||||
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
|
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
|
||||||
egui_extras::install_image_loaders(ctx); // apperently it's okay to have this every update
|
|
||||||
// as it's only done once? sus
|
|
||||||
egui::TopBottomPanel::top("top_panel").show(ctx, |ui| {
|
egui::TopBottomPanel::top("top_panel").show(ctx, |ui| {
|
||||||
self.top_panel(ui, ctx);
|
self.top_panel(ui, ctx);
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
use egui::{Color32, ImageSource};
|
use super::Entry;
|
||||||
|
|
||||||
use super::{Entry, ICON_RAW};
|
|
||||||
|
|
||||||
pub struct ShowBox {
|
pub struct ShowBox {
|
||||||
entry: Entry,
|
entry: Entry,
|
||||||
|
@ -18,17 +16,8 @@ impl ShowBox {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl egui::Widget for ShowBox {
|
impl egui::Widget for ShowBox {
|
||||||
fn ui(mut self, ui: &mut egui::Ui) -> egui::Response {
|
fn ui(self, ui: &mut egui::Ui) -> egui::Response {
|
||||||
ui.vertical_centered(|ui| {
|
ui.vertical_centered(|ui| ui.button("i dont get it").union(ui.label("caption")))
|
||||||
ui.add(
|
|
||||||
egui::Image::new(ImageSource::Bytes {
|
|
||||||
uri: std::borrow::Cow::Borrowed("fuck you"),
|
|
||||||
bytes: egui::load::Bytes::Static(ICON_RAW),
|
|
||||||
})
|
|
||||||
.rounding(5.0),
|
|
||||||
);
|
|
||||||
ui.button("i dont get it").union(ui.label("caption"))
|
|
||||||
})
|
|
||||||
.response
|
.response
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue