rerun-io / rerun

Visualize streams of multimodal data. Fast, easy to use, and simple to integrate. Built in Rust using egui.
https://rerun.io/
Apache License 2.0
6.32k stars 301 forks source link

Custom window frames for Windows and Linux #1063

Open emilk opened 1 year ago

emilk commented 1 year ago

Currently the viewer frame on Windows and Linux have an ugly platform-specific header with a title, close buttons, and a minimize button.

We should just replace those with our own window frame, like in https://github.com/emilk/egui/tree/master/examples/custom_window_frame

TODO:


What Rerun currently looks like on Gnome/xorg:

image

If you enable CUSTOM_WINDOW_DECORATIONS on main:

custom-window-frame

emilk commented 9 months ago

There are a bunch of open issues with custom window frames in eframe: https://github.com/emilk/egui/issues?q=is%3Aissue+is%3Aopen+custom_window_frame

teh-cmc commented 6 months ago

Custom decorations working fine on Linux/Wayland/Sway.

 /// If true, we fill the entire window, except for the close/maximize/minimize buttons in the top-left.
 /// See <https://github.com/emilk/egui/pull/2049>
-pub const FULLSIZE_CONTENT: bool = cfg!(target_os = "macos");
+pub const FULLSIZE_CONTENT: bool = true;

 /// If true, we hide the native window decoration
 /// (the top bar with app title, close button etc),
 /// and instead paint our own close/maximize/minimize buttons.
-pub const CUSTOM_WINDOW_DECORATIONS: bool = false; // !FULLSIZE_CONTENT; // TODO(emilk): https://github.com/rerun-io/rerun/issues/1063
+pub const CUSTOM_WINDOW_DECORATIONS: bool = true; // !FULLSIZE_CONTENT; // TODO(emilk): https://github.com/rerun-io/rerun/issues/1063

image

Close button works as expected -- others don't but that's expected on my setup.

Wumpf commented 5 months ago

Using the same diff on Windows 11: image

Minimize/maximize/close work.

Issues:

emilk commented 3 months ago

I miss the good old days of native ui everywhere

You work for the wrong company 😅

emilk commented 3 months ago

I'm pretty sure if me or @nikolausWest worked on a Linux or Windows machine, this issue would have a much higher priority