On 22/02/17 08:15, Daniel P. Berrange wrote:
> 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

Ah, this branch does not have all the dialogs that are changed in this
series. In fact this branch was one of the motivations of changing the
dialogs in the first place. With the changes in the main application
window, it would make sense to have the dialogs ported as well. If you
want to try only this series, the branch is dialogs, on that same
repository.

> 
> 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 checked the about dialog code, and it checks for
"gtk-dialogs-use-header" GtkSettings to decide whether it should use the
GtkHeaderBar widget or not. This is probably set by the desktop environment.

https://git.gnome.org/browse/gtk+/tree/gtk/gtkaboutdialog.c#n800
https://git.gnome.org/browse/gtk+/tree/gtk/gtkdialog.c#n254

> 
> 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.
> 

Although I am not really fond of it, one idea is to use that same
setting used by the about dialog above to conditionally build the UI
using header bars or not.

> 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.

I think with that conditional, the problem with Windows should be gone
as well. I will check how much of complexity this would add to the
codebase, and we can discuss better over the new series.


-- 
Eduardo de Barros Lima (Etrunko)
Software Engineer - RedHat
etru...@redhat.com

_______________________________________________
virt-tools-list mailing list
virt-tools-list@redhat.com
https://www.redhat.com/mailman/listinfo/virt-tools-list

Reply via email to