mirror of
https://github.com/aljazceru/notedeck.git
synced 2026-01-06 18:04:20 +01:00
upgrade to egui 0.22.0
This commit is contained in:
1416
Cargo.lock
generated
1416
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@@ -12,10 +12,10 @@ crate-type = ["lib", "cdylib"]
|
||||
|
||||
[dependencies]
|
||||
#egui-android = { git = "https://github.com/jb55/egui-android.git" }
|
||||
egui = "0.20.0"
|
||||
eframe = { version = "0.20.0", features = [ "wgpu" ] }
|
||||
egui = "0.22.0"
|
||||
eframe = { version = "0.22.0", features = [ "wgpu" ] }
|
||||
#eframe = "0.20.0"
|
||||
egui_extras = { version = "0.20.0", features = ["image", "svg"] }
|
||||
egui_extras = { version = "0.22.0", features = ["image", "svg"] }
|
||||
ehttp = "0.2.0"
|
||||
image = { version = "0.24", features = ["jpeg", "png", "webp"] }
|
||||
log = "0.4.17"
|
||||
|
||||
@@ -64,7 +64,7 @@ impl Default for Damus {
|
||||
}
|
||||
|
||||
pub fn is_mobile(ctx: &egui::Context) -> bool {
|
||||
let screen_size = ctx.input().screen_rect().size();
|
||||
let screen_size = ctx.screen_rect().size();
|
||||
screen_size.x < 550.0
|
||||
}
|
||||
|
||||
@@ -388,7 +388,7 @@ fn set_app_style(ui: &mut egui::Ui) {
|
||||
}
|
||||
|
||||
fn render_damus_mobile(ctx: &egui::Context, app: &mut Damus) {
|
||||
let panel_width = ctx.input().screen_rect.width();
|
||||
let panel_width = ctx.screen_rect().width();
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
set_app_style(ui);
|
||||
timeline_panel(ui, app, panel_width, 0);
|
||||
@@ -398,7 +398,7 @@ fn render_damus_mobile(ctx: &egui::Context, app: &mut Damus) {
|
||||
fn render_damus_desktop(ctx: &egui::Context, app: &mut Damus) {
|
||||
render_panel(ctx, app);
|
||||
|
||||
let screen_size = ctx.input().screen_rect.width();
|
||||
let screen_size = ctx.screen_rect().width();
|
||||
let calc_panel_width = (screen_size / app.n_panels as f32) - 30.0;
|
||||
let min_width = 300.0;
|
||||
let need_scroll = calc_panel_width < min_width;
|
||||
@@ -409,7 +409,7 @@ fn render_damus_desktop(ctx: &egui::Context, app: &mut Damus) {
|
||||
};
|
||||
|
||||
if app.n_panels == 1 {
|
||||
let panel_width = ctx.input().screen_rect.width();
|
||||
let panel_width = ctx.screen_rect().width();
|
||||
egui::CentralPanel::default().show(ctx, |ui| {
|
||||
set_app_style(ui);
|
||||
timeline_panel(ui, app, panel_width, 0);
|
||||
|
||||
@@ -14,7 +14,7 @@ async fn main() {
|
||||
tracing_subscriber::fmt::init();
|
||||
|
||||
let native_options = eframe::NativeOptions::default();
|
||||
eframe::run_native(
|
||||
let _res = eframe::run_native(
|
||||
"Damus Desktop",
|
||||
native_options,
|
||||
Box::new(|_cc| Box::new(Damus::new())),
|
||||
|
||||
Reference in New Issue
Block a user