[virt-tools-list] [PATCH virt-viewer 00/10] Make dialogs use GtkHeaderBar

Daniel P. Berrange berrange at redhat.com
Wed Feb 22 11:15:22 UTC 2017


On Thu, Feb 16, 2017 at 10:57:52PM +0000, Daniel P. Berrange wrote:
> On Thu, Feb 16, 2017 at 11:05:13AM -0200, Eduardo Lima (Etrunko) wrote:
> > On 16/02/17 10:06, Pavel Grunt wrote:
> > > Hi,
> > > 
> > > On Thu, 2017-02-09 at 17:22 -0200, Eduardo Lima (Etrunko) wrote:
> > >> This whole series is the result of the initial idea of having the
> > >> new
> > >> iso-dialog to use this widget. Having it done only for the iso-
> > >> dialog
> > >> would not make much sense, so I went on and ported all other
> > >> dialogs.
> > >> The widget requires Gtk version 3.12, which should not be a problem
> > >> for
> > >> any recent distro.
> > >>
> > >> Using GtkHeaderBar makes dialogs look cleaner and more 'modern',
> > >> also
> > >> follow the style used by GNOME applications. In the near future,
> > >> virt-viewer main window could also make use of it, as we recently
> > >> saw in
> > >> a series sent to this mailing list.
> > > 
> > > so are we going for the GNOME style for all desktop envs ? In my
> > > opinion it does not look nice in Windows and Xfce - simply does not
> > > fit it in. iirc it was mentioned that there is a way to have both the
> > > classic and the GNOME look in the discussion about Sagar's patches few
> > > weeks ago..
> > 
> > I have no idea of what it looks like in Windows, but it indeed looks
> > good in Linux environments. I tested in both GNOME and Enlightenment,
> > not sure about other DEs out there. As far as I remember, the discussion
> > on that other series was about the classic menu versus the buttons on
> > the header bar.
> 
> Please post some screenshots showing the before & after state of this
> on GNOME, Linux non-GNOME and Windows, so we can accurately evaluate
> what the change is.

So I've just done some tests on TWM and Windows against

https://github.com/etrunko/virt-viewer/tree/headerbar

The results are here:

  https://berrange.fedorapeople.org/virt-viewer-gtk-headerbar/win32/
  https://berrange.fedorapeople.org/virt-viewer-gtk-headerbar/twm/

On Win32 the key things are

 - The about & prefs dialog use the Win32 native style header
 - The connect dialog & main window use the GNOME headerbar style


On TWM the key things are

 - The about & prefs dialog use the TWM native style header
 - The connect dialog & main window use the TWM native style header
   *and* the GNOME headerbar style at the same time.


Some things...

GTK is smart with the About dialog - it is obviously dynamically
choosing whether to use a header bar or not and avoids it on both
TWM & Windows, but uses it on GNOME.

I'm not seriously expecting anyone to run with TWM. I picked it
simply as an example of a "dumb" window manager that won't understand
hints required to turn off headers when client side decorations are
used

I'm open to being convinced that this is a complete non-issue, if
all commonly used modern window managers support client side
decorations. I suspect this is probably the case, but it'd be good
to validate this with demos across all the common desktop envs on
Linux (GNOME, KDE, XFCE, Mate, Cinnamon, etc), so we know what to
expect for users.

This does still leave a question of themeing under non-GNOME. eg
running under say KDE, virt-viewer would previously have a KDE
theme header bar, whereas it now (might) have a GNOME style theme.
Again we can possibly declare this is a non-issue as it just requires
someone to write some GTK CSS to make it fit with KDE theme, and people
may well have already dealt with this since there's other GNOME apps
using headerbars already.

The Windows behaviour is a bigger question mark to me. We see GTK
being smart with the About dialog and not using header bar, keeping
the native Win32 style. I think the GNOME headerbar on the main
window looks totally out of place on Win32. If you look at other
apps like Firefox which try to use a headerbar-like approach, they
keep the Win32 style, but seemlessly blend it into their headerbar

https://berrange.fedorapeople.org/virt-viewer-gtk-headerbar/ff-win32.png

So I'm inclined to say we should *not* use headerbar for Win32
unless there's a way to make it blend wit the win32 theme - having
it use the default GTK/GNOME style just looks wrong IMHO.

Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://entangle-photo.org       -o-    http://search.cpan.org/~danberr/ :|




More information about the virt-tools-list mailing list