Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show the mobile OS warning banner on web #1685

Merged
merged 1 commit into from
Mar 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions crates/re_viewer/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1012,11 +1012,16 @@ impl AppState {
}
}

fn warning_panel(re_ui: &re_ui::ReUi, ui: &mut egui::Ui, _frame: &mut eframe::Frame) {
fn warning_panel(re_ui: &re_ui::ReUi, ui: &mut egui::Ui, frame: &mut eframe::Frame) {
// We have not yet optimized the UI experience for mobile. Show a warning banner
// with a link to the tracking issue.
if ui.ctx().os() == egui::os::OperatingSystem::IOS
|| ui.ctx().os() == egui::os::OperatingSystem::Android

// Although this banner is applicable to IOS / Android generically without limit to web
// There is a small issue in egui where Windows native currently reports as android.
// TODO(jleibs): Remove the is_web gate once https://github.com/emilk/egui/pull/2832 has landed.
if frame.is_web()
&& (ui.ctx().os() == egui::os::OperatingSystem::IOS
|| ui.ctx().os() == egui::os::OperatingSystem::Android)
{
let frame = egui::Frame {
fill: ui.visuals().panel_fill,
Expand Down