-
Notifications
You must be signed in to change notification settings - Fork 938
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
Update colors and widget appearance for UI #1646
Conversation
We should have a consistent color set over all widgets.
Work around a bug in Fl_Input_Choice where it forgets to set the proper "input background" on some parts.
Inspired by modern Windows appearance, and to some extent macOS. They have flat boxes and use white, or very light, colors for interactive elements. Unfortunately we can't directly control the colors of widgets, so instead we just lighten everything that uses this box type. GNOME uses a different design, both their older and newer style. But UI look is less consistent on Linux, so hopefully our new look is decent enough there as well.
There is something broken with these FLTK draw routines on Windows. They leave gaps at the start and end of the arc/pie rather than filling the whole specified span. So we need to nudge the numbers a bit to work around this.
Follow the colors that modern desktops use when it comes to background, text and selections.
Looks nice when I build things myself on Fedora 38, but the RHEL9 nightly (from http://tigervnc.bphinz.com/nightly/) looks wrong: |
Huh. Very odd. I can reproduce it by rebuilding the RPM packages on a RHEL 9 machine here. It doesn't happen if I build TigerVNC manually on the same machine though. |
After some more digging, the triggering condition is enabling PIC/PIE, which Red Hat does by default for RPM builds. Unclear why this breaks things, though. |
Found it. Box types cannot be larger than 255, and unfortunately FLTK doesn't protect against this. So we were doing out-of-bounds access. PIC/PIE changes the memory layout, which fortunately was enough to make the issue visible. |
Fixed in 4cef5c9. |
Another part broken out of #1410. This time it is updating the colors to match modern systems better, and a new look for the widgets (as much as FLTK easily allows).
This is mainly trying to mimic Windows Fluent, but that is also close to macOS styling. It doesn't follow GNOME's adwaita (old or new), but UI look is less standardised on Linux so it should be acceptable there as well.
Before:
After: