android: update to latest winit/egui/android-activity
so we can start fixing this shit Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
@@ -33,30 +33,13 @@ pub struct Notedeck {
|
||||
unrecognized_args: BTreeSet<String>,
|
||||
}
|
||||
|
||||
fn margin_top(narrow: bool) -> f32 {
|
||||
#[cfg(target_os = "android")]
|
||||
{
|
||||
// FIXME - query the system bar height and adjust more precisely
|
||||
let _ = narrow; // suppress compiler warning on android
|
||||
40.0
|
||||
}
|
||||
#[cfg(not(target_os = "android"))]
|
||||
{
|
||||
if narrow {
|
||||
50.0
|
||||
} else {
|
||||
0.0
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Our chrome, which is basically nothing
|
||||
fn main_panel(style: &egui::Style, narrow: bool) -> egui::CentralPanel {
|
||||
fn main_panel(style: &egui::Style) -> egui::CentralPanel {
|
||||
let inner_margin = egui::Margin {
|
||||
top: margin_top(narrow),
|
||||
left: 0.0,
|
||||
right: 0.0,
|
||||
bottom: 0.0,
|
||||
top: 0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
bottom: 0,
|
||||
};
|
||||
egui::CentralPanel::default().frame(egui::Frame {
|
||||
inner_margin,
|
||||
@@ -73,7 +56,7 @@ impl eframe::App for Notedeck {
|
||||
// handle account updates
|
||||
self.accounts.update(&mut self.ndb, &mut self.pool, ctx);
|
||||
|
||||
main_panel(&ctx.style(), crate::ui::is_narrow(ctx)).show(ctx, |ui| {
|
||||
main_panel(&ctx.style()).show(ctx, |ui| {
|
||||
// render app
|
||||
if let Some(app) = &self.app {
|
||||
let app = app.clone();
|
||||
|
||||
@@ -29,7 +29,7 @@ pub struct ColorTheme {
|
||||
pub inactive_weak_bg_fill: Color32,
|
||||
}
|
||||
|
||||
const WIDGET_ROUNDING: Rounding = Rounding::same(8.0);
|
||||
const WIDGET_ROUNDING: Rounding = Rounding::same(8);
|
||||
|
||||
pub fn create_themed_visuals(theme: ColorTheme, default: Visuals) -> Visuals {
|
||||
Visuals {
|
||||
@@ -83,12 +83,12 @@ pub fn create_themed_visuals(theme: ColorTheme, default: Visuals) -> Visuals {
|
||||
},
|
||||
extreme_bg_color: theme.extreme_bg_color,
|
||||
error_fg_color: theme.err_fg_color,
|
||||
window_rounding: Rounding::same(8.0),
|
||||
window_rounding: Rounding::same(8),
|
||||
window_fill: theme.window_fill,
|
||||
window_shadow: Shadow {
|
||||
offset: [0.0, 8.0].into(),
|
||||
blur: 24.0,
|
||||
spread: 0.0,
|
||||
offset: [0, 8],
|
||||
blur: 24,
|
||||
spread: 0,
|
||||
color: egui::Color32::from_rgba_unmultiplied(0x6D, 0x6D, 0x6D, 0x14),
|
||||
},
|
||||
window_stroke: Stroke {
|
||||
|
||||
Reference in New Issue
Block a user