timlau / yumex-dnf-old

Next Generation of Yum Extender using DNF as backend
GNU General Public License v2.0
61 stars 17 forks source link

feature request: css style class at toplevel + show searchbar all the time #108

Closed raveit65 closed 8 years ago

raveit65 commented 8 years ago

First i want to say that the new design with a stackswitcher looks much better and improve the usability. But you use a headerbar as container for the stackswitcher. Headerbars have mostly round top corners in nearly all themes. With some themes this can look bad, ie. Submarine themes from mate-themes. bildschirmfoto zu 2016-05-13 12-17-12 I can remove the border-radius with

window.background > box.vertical > headerbar {
    border-radius: 0px;
}

But this is a general selector and it is possible that i match another application I would like to use this:

window.background.yumex-dnf > box.vertical > headerbar {
    border-radius: 0px;
}

An example for adding a style class at top level for a python application is here: https://github.com/compiz-reloaded/ccsm/commit/cd0702a50318ba617973382457482512e518282d This will make it possible to style yumex-dnf independent from other applications, very useful for dark themes.

Is there a reason why you don't show the searchbar all the time? For me it is one useless click more.

Thank you

timlau commented 8 years ago

I see that dont look so good, the idea was to use the same widget and place it in the headerbar, if we are in gnome and use it as tool bar for the other DE's. The cause that the searchbar is hidden by default is to save screen space for showing more packages. but I see you point, I will do some test to how it works with the searchbar always on

raveit65 commented 8 years ago

Hmm, you don't see the white areas from the background on top of the round borders in screenshoot? Well, it dependents on the theme. With a light theme you won't see that if headerbar and background have the same bg color. I didn't test it in gnome, but i guess here yumex-dnf is a CSD window or SSD is used. In both cases the selector in themes are different. window.background.csd window.background.ssd Anyway, from my point of view as a theme artist using a specific selector at top level is always a good idea with gtk+-3.20. I see so many apps which doesn't look perfect, but without a specific selector i can't improve anything : -/ This is one disadvantage with switching to nodes with gtk+-3.20. Also important gnome apps like nautilus have added such a app style class at top level with 3.20.

timlau commented 8 years ago

I see them, it look's bad, think I will put the the shared design element in a Gtk.Box and add them to a headerbar in gnome and add it as a toolbar in other DE's

timlau commented 8 years ago

I will add a top CSS top class also, to make it easier to tweak the look

timlau commented 8 years ago

Added yumex-dnf-window as css class https://github.com/timlau/yumex-dnf/commit/9eb884aacb15d755be3bc0a37503399dcbafa6b4

timlau commented 8 years ago

please test if it works better now

see https://github.com/timlau/yumex-dnf/wiki/Testing-yumex-for-developing

raveit65 commented 8 years ago

Thank you.

One thing, can you remove the margin from headerbox and add a margin to main_switcher and right_header ? Because if i style the box that lt looks like headerbar or primary-toolbar styling, there is a area around the box which use the bg color of the window. with margin around headerbox: bildschirmfoto zu 2016-05-13 17-30-17 improved margin settings: bildschirmfoto zu 2016-05-13 17-11-19 Here is the patch for it https://gist.github.com/raveit65/db62642f206981d1b0f16442c079334e I can also do a PR if you like.

raveit65 commented 8 years ago

Adding the style class 'primary-toolbar' to this box would make styling more simple ;) And it tells what it is.

genodeftest commented 8 years ago

I have some questions, mostly for @raveit65:

  1. Why do you want a margin in the GtkHeaderBar? This just increases the size, breaks consistency with other Gtk+ applications (e.g. gnome-calendar, nautilus, …). What's the benefit? How about removing these margins at all and be consistent with other Gtk+ applications?
  2. Why do you want to have the search bar visible by default? This is quite uncommon for Gtk+ 3.x applications.
genodeftest commented 8 years ago

I've added an alternative proposal. @raveit65 can you please test it from my alt-108-no-margins branch? I'm leaving this open for discussion.

raveit65 commented 8 years ago

Well, i'm not sure if you have read my patch correctly. https://gist.github.com/raveit65/db62642f206981d1b0f16442c079334e 1) i removed the margin from object class="GtkBox" id="headerbox" 2) i set a little margin (3px) around main_switcher and right_header boxes, otherwise edges of buttons matching directly with the edges of headerbox For me point 2) make it nicer if you don't use yumex-dnf as a CSD Window. But this commit do never set a margin to a headerbar of CSD Windows :smile: The headerbox is a box inside the GtkHeaderbar. Anyway, for me is point 1) important, if you want to remove the margin from 2) i will set it in mate-themes ;) I don't really care about it.....

Making the searchbar visible as default saves one useless mouse-click and improve usability. A user don't have to think about ' where the hell i can search for packages in yumex-dnf " ;)

raveit65 commented 8 years ago

Btw. porting 8 themes to GTK+-3.20 did shown me that it is a lie that all CSD apps use the same settings. Example: most use headerbar.titlebar () as theme selector, but gedit use .titlebar headerbar () as selector. The result is that theming gtk+-3.20 is more complicated ;)

raveit65 commented 8 years ago

bildschirmfoto zu 2016-05-14 20-43-07 This is the result of your proposal. I don't think that it is nice that button edges matching directly with metacity decoration and the other part of the window. But as i said i can correct this in theme settings. Make everthing nice in gnome and forget other desktops......

genodeftest commented 8 years ago

Ok, I think I got now what you want yumex-dnf to behave like. Thanks for the patience.

I don't like the margins around headerbox either, so we can agree on that. Don't get me wrong, I don't want to make it look ugly on non-gnome desktops. I think the solution would be to add the margin only when not using a GtkHeaderBar (i.e. only on non-gnome desktops).

Search bar: When you search for something you have to use your keyboard so you could easily press Ctrl+F before starting to type. When showing the search bar by default, Ctrl+F hides it, which is quite contrary to user experience in most applications. If we want to change this I'd recommend a solution thought through, not a quick fix..

raveit65 commented 8 years ago

I don't like the margins around headerbox either, so we can agree on that. Don't get me wrong, I don't want to make it look ugly on non-gnome desktops. I think the solution would be to add the margin only when not using a GtkHeaderBar (i.e. only on non-gnome desktops).

+1

Search bar: When you search for something you have to use your keyboard so you could easily press Ctrl+F before starting to type. When showing the search bar by default, Ctrl+F hides it, which is quite contrary to user experience in most applications. If we want to change this I'd recommend a solution thought through, not a quick fix..

That's true, this can be confusing, but why should a user press crtl+f if the searchbar is visible? I noticed also that the searchbar is shown on every tab of the stackswitcher after start of yumex-dnf. After toggling the button one time it works like it should and the searchbar is only shown in package tab. Not shure if this is a result of making the searchbar default or it was a issue before. So, i agree that this should be improved in any case. Well at least it is a question of what is a good usability for a package-manager. For me a searchbar where i can search for a package is a main function of a p-m. Unlike a texteditor gui where searching for text isn't a main function. So i can't say that hiding a searchbar by default is a good usability for all applications. I know that gnome devs see that different and they removed or hide a lot of features since 3.0.

Btw. that i don't like headerbars very much is because the Solid-CSD state (without compositor) does not work very well, here the headerbars have always square top corners. Border-radius settings in themes are still ignored and gtk+ devs do nothing to improve that since 3.16.

genodeftest commented 8 years ago

I've split this up into a new issue for the search bar (#113) and a pull request (#115). @raveit65 Can you please test #115 and report back if this works for you?

raveit65 commented 8 years ago

Yeap, this works nice with non headerbars, thank you merged: https://github.com/timlau/yumex-dnf/commit/4233af1ee3bc18bcff8336dffecc99285fd9be26