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

Revamp of connect and options UI #1410

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from

Conversation

CendioOssman
Copy link
Member

A suggestion of revamping the UI a bit. The main driving factor was that the tab layout in the options dialog was limiting future development. But as I was poking around with that I did some general cleanup as well to make things slightly less dated.

Before:

Connect dialog
Options dialog

After:

Connect dialog
Options dialog

@CendioOssman
Copy link
Member Author

Also an increase of the font size a bit:

Server dialog
Options dialog

Not as much as I'd like though because of hard coded sizes within FLTK.

Copy link
Member

@samhed samhed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks awesome, a definite improvement! Let's do this

#endif
// GNOME uses (53,132,228), macOS (0, 122, 255), this is the lightest
// version of GNOME's that fl_contrast() won't screw up
Fl::set_color(FL_SELECTION_COLOR, 29, 113, 215);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GNOME's Adwaita also uses a white background (also icons + left adjusted labels) in the left menu list. I think that might look nice here as well!
new-GNOME-settings-design-750x525

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't see an easy way to get the borders, and I think it will look odd without those.

Icons won't work as FLTK has no handling for inverting them when things get selected.

I also would have preferred aligning the labels on the left, but it looks horrible as FLTK has basically no margins.

All of this might be possible by doing a custom widget, but that is more work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tigervnc_white_menu

This is what it would look like with the white background, I had to add a white area left of the buttons to get the bottom left bit, but I think it looks fine without any borders. What do you think? Is it a problem that the Cancel/OK buttons look attached to the client area?

Copy link
Member

@samhed samhed Jan 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tigervnc_menu_with_border

Added a border using:

void Notebook::draw()
{
  this->draw_box(FL_FLAT_BOX, labels->w(), 0, 1, h(), FL_DARK3);
  this->draw_children();
  Fl_Group::draw();
}

edit:
This also required modifying the height of the notebook.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That looks odd. Looks like the buttons are part of the page, and are not global for everything.

But fair enough, if you want it that badly. ;)

Here's what a more complete implementation would look like:

Screenshot from 2022-01-28 16-19-15

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, I love that!

serverName->align(FL_ALIGN_LEFT | FL_ALIGN_TOP);
y += INPUT_HEIGHT + 20;

divider = new Fl_Box(20, y, w() - 20*2, 2);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my eyes, the ServerDialog fits better with the new OptionsDialog if we get rid of this divider.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tigervnc_no_divider

how it looks without a divider

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Either way looks fine to me. Originally I tried to copy a design with a different background for the server name section, to bring attention to that. But I couldn't get that to work, so the divider was a different attempt to do so.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it seems for example my_fl_group->color(FL_BLUE); does nothing.. Setting a background color works on Fl_Box or Fl_Scroll though.

@bphinz
Copy link
Member

bphinz commented Jan 28, 2022 via email

@CendioOssman
Copy link
Member Author

I'm not entirely happy with the server dialog. Another approach is this:

Screenshot from 2022-01-28 17-39-49

@bphinz
Copy link
Member

bphinz commented Jan 28, 2022 via email

@samhed
Copy link
Member

samhed commented Jan 28, 2022

tigervnc_serverdialog

Was it something like this you imagined with regards to a different color to highlight the server name section @CendioOssman?

I realize this is highly subjective, but I would prefer not to add too much color.

@CendioOssman
Copy link
Member Author

Another approach that avoids too much graphics, yet still gets the horizontally dominant layout:

Screenshot from 2022-02-02 15-52-53

@bphinz
Copy link
Member

bphinz commented Feb 2, 2022 via email

@samhed
Copy link
Member

samhed commented Feb 2, 2022

I like this last one the best 🙂

Is something stopping us from merging this? I think the changes are logical and things look great.

@CendioOssman
Copy link
Member Author

I'd like to play around with it a bit more first and see how far I can push this. Both Windows and GNOME are moving towards a more flat and rounded look, so I'd like to see how close we can get. Prototype looks like this:

Screenshot from 2022-02-03 10-22-51

The problem is that FLTK is not really flexible enough to do this. So we might have to reimplement convenience functions such as fl_ask() and Fl_File_Chooser.

@CendioOssman
Copy link
Member Author

I also need to check how this fits with Windows and macOS. I've just been comparing with GNOME so far.

@samhed
Copy link
Member

samhed commented Feb 3, 2022

Wow, the latest screenshot looks great! This is going to be awesome

Is it possible to change the look of the file chooser / ask dialog at all without making our own?

@CendioOssman
Copy link
Member Author

The ask dialog is likely easier to just do our own. Haven't checked the file chooser. The built-in one is rather horrible anyway, so might be an excuse to do a better one.

@phedoreanu
Copy link

phedoreanu commented May 14, 2022

Any chance of a dark mode? 😀

@CendioOssman
Copy link
Member Author

Probably not. There is enough feature creep on this as it is. So dark mode is best dealt with separately.

@CendioOssman
Copy link
Member Author

This is dragging on, so I've capitulated a bit and decided it's probably acceptable to do this in two steps.

So the target now is doing what's possible within FLTK's box model. That means buttons will have borders, rather than different colors. I.e. pre-42 GNOME.

Current working copy:

Screenshot from 2022-06-17 13-52-45
Screenshot from 2022-06-17 13-52-48

We should have a consistent color set over all widgets.
Modern UIs use lighter colors. Let's fit in. Mostly taken from GNOME's
default theme.
Modern systems generally use 11pt rather than the 10pt we're targeting.
Increase this to almost 11pt to fit better in. Going further looks a bit
odd because of all hard coded margins in FLTK.
Try to make things look a little bit more appealing, and reduce some of
the clutter at the same time with a focus on the commonly used elements.
Try to match GNOME's default theme a bit better.
To fit better with what Windows itself uses.
To better match what native widgets look like.

This also adds a shaded edge on round boxes, even though that doesn't
match Windows and macOS. However, we cannot properly match what they do
for radio buttons, so let's be internally consistent instead.
They have flat boxes instead. They also 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.
These makes them look less harsh, especially on platforms without
anti-aliasing. This is also what both macOS and GNOME do.

For up boxes we draw outside the given boundaries. Hopefully this won't
cause side effects...
Follow the colors that modern desktops use when it comes to background,
text and selections.
@samhed samhed linked an issue Apr 17, 2023 that may be closed by this pull request
@samhed samhed mentioned this pull request Apr 17, 2023
@L-U-T-i
Copy link

L-U-T-i commented Apr 21, 2023

In old connect window, there are also "Load" and "Save as" buttons. I can't find anything like in the new UI (also not within the Options window...). Does it mean we won't get those possibilities with the new UI?

I think it would be great to keep a simple way to export and import current settings...

@CendioOssman
Copy link
Member Author

I was hoping to move those functions in to the options dialog, yes.

@ercanal
Copy link

ercanal commented May 10, 2023

This new UI is much better.
Is it possible to add a recent connection list in the main window so that connection can be started by just one double-click instead select from the drop-down list and click OK?
And an option to delete that history in the preferences?

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Aug 20, 2023

#1410 (comment)

I really don't like the vertical versions of the branding. In fact, I love that the current version has none. I'm using a VNC viewer, so I really don't think there's any need to inspire brand loyalty, so when I have the connection window on my screen, I don't want it to waste space. The titlebar already tells me what application I'm using, and if the .desktop file is correct, it'll have a pleasant little icon beside it anyway.

#1410 (comment)

I think that the slight horizontal padding on the selected option really helps since you haven't put any button outlines. I find that myself (despite being young) and some older folk do not necessarily notice that those kinds of options are buttons. Although a vertical list is a great improvement over the current horizontal navigation tabs, they're less obviously buttons in most implementations. This assists vaguely.

@samhed
Copy link
Member

samhed commented Aug 21, 2023

I think that the slight horizontal padding on the selected option really helps since you haven't put any button outlines. I find that myself (despite being young) and some older folk do not necessarily notice that those kinds of options are buttons. Although a vertical list is a great improvement over the current horizontal navigation tabs, they're less obviously buttons in most implementations. This assists vaguely.

That's a good point, I agree.

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Aug 21, 2023

I'd always prefer a design like GitHub/KDE's, where anything clickable, such as the buttons, are always outlined, but I understand that that might not fit with the GNOME HIG, if that's what you're intending to replicate.

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

Successfully merging this pull request may close these issues.

Look is outdated
7 participants