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

Update colors and widget appearance for UI #1646

Merged
merged 5 commits into from
Jul 14, 2023

Conversation

CendioOssman
Copy link
Member

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:

Screenshot from 2023-07-14 14-41-27

After:

Screenshot from 2023-07-14 14-41-19

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.
@CendioOssman CendioOssman added the enhancement New feature or request label Jul 14, 2023
@CendioOssman CendioOssman merged commit f1c84ad into TigerVNC:master Jul 14, 2023
12 checks passed
@CendioOssman CendioOssman deleted the newui-lite branch July 14, 2023 12:58
@samhed
Copy link
Member

samhed commented Jul 17, 2023

Looks nice when I build things myself on Fedora 38, but the RHEL9 nightly (from http://tigervnc.bphinz.com/nightly/) looks wrong:

image

@CendioOssman
Copy link
Member Author

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.

@CendioOssman
Copy link
Member Author

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.

@CendioOssman
Copy link
Member Author

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.

@CendioOssman
Copy link
Member Author

Fixed in 4cef5c9.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants