After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769012 - Improve windows list theming
Improve windows list theming
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: window list
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-20 21:50 UTC by Antonio Ospite
Modified: 2017-03-05 18:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
An example of style for the tasklist (1.50 KB, text/css)
2016-07-20 21:50 UTC, Antonio Ospite
  Details
Improve the asklist style (4.35 KB, patch)
2016-07-21 21:37 UTC, Antonio Ospite
none Details | Review
Screenshot of the improved style (38.95 KB, image/png)
2016-07-21 21:39 UTC, Antonio Ospite
  Details
Screenshot of the improved style v2 (100.46 KB, image/png)
2016-08-01 10:31 UTC, Antonio Ospite
  Details
Improve the tasklist style v2 (4.48 KB, patch)
2016-08-24 09:00 UTC, Antonio Ospite
none Details | Review
Improve the tasklist style v3 (4.26 KB, patch)
2016-08-25 15:21 UTC, Antonio Ospite
none Details | Review
Remove the white text-shadow and use a darker color on :hover (27.70 KB, image/png)
2016-10-10 21:16 UTC, Antonio Ospite
  Details
final comparison of the new tasklist style for the light theme (41.36 KB, image/png)
2016-11-11 12:41 UTC, Antonio Ospite
  Details
theme: improve the tasklist style (4.11 KB, patch)
2016-11-11 12:42 UTC, Antonio Ospite
committed Details | Review
style the box inside the button instead of the button itself (2.96 KB, patch)
2017-03-05 18:12 UTC, Antonio Ospite
committed Details | Review

Description Antonio Ospite 2016-07-20 21:50:53 UTC
Created attachment 331848 [details]
An example of style for the tasklist

Hi,

I am trying to fix the few issues left with gnome-flashback and gtk+-3.20, I already submitted a couple of bugs to Gtk+:

https://bugzilla.gnome.org/show_bug.cgi?id=769003
https://bugzilla.gnome.org/show_bug.cgi?id=769006

The only one left is about the styling of the window list in gnome-panel.

I am attaching some snippets I ripped from Adwaita and adapted for the tasklist, however another (simpler?) style could work.

The attached changes have also the nice side effect that now the windows list does not span on *two rows* on a 48px tall panel, like the unstyled task list does.

Thanks,
   Antonio
Comment 1 Alberts Muktupāvels 2016-07-20 23:25:50 UTC
Can you please create patch that I can apply to test? Also before/after image would be nice.
Comment 2 Antonio Ospite 2016-07-21 21:37:39 UTC
Created attachment 331921 [details] [review]
Improve the asklist style

Here is the patch.
Comment 3 Antonio Ospite 2016-07-21 21:39:26 UTC
Created attachment 331922 [details]
Screenshot of the improved style

And here is the screenshot illustrating the changes.

If you prefer a flatter style, just tell me.

Thanks,
  Antonio
Comment 4 Alberts Muktupāvels 2016-07-28 23:42:35 UTC
I have no idea what I would prefer... :( Maybe you should try ask in mailing-list for review? To know what other thinks?

Did you also test with default panel size? Right now I just did quick look at patch and your screen-shot.

What do you think about using margin (1px ?) to create small space around buttons?
Comment 5 Antonio Ospite 2016-07-29 08:49:13 UTC
OK, I will prepare a screenshot with the default panel size, with and without a margin, and then ask on the mailing list.

Since I have to touch the style again, do you think I should use the named color Adwaita defines?
https://git.gnome.org/browse/gtk+/tree/gtk/theme/Adwaita/gtk-contained.css#n4636

Or do you prefer literal values for colors?

Thanks,
   Antonio
Comment 6 Alberts Muktupāvels 2016-07-29 08:52:29 UTC
(In reply to Antonio Ospite from comment #5)
> Since I have to touch the style again, do you think I should use the named
> color Adwaita defines?
> https://git.gnome.org/browse/gtk+/tree/gtk/theme/Adwaita/gtk-contained.
> css#n4636
> 
> Or do you prefer literal values for colors?

Up to you, also it depends if we want that panel automatically follows Adwaita changes...
Comment 7 Antonio Ospite 2016-08-01 10:31:41 UTC
Created attachment 332470 [details]
Screenshot of the improved style v2

Hi, 

I am attaching an updated screenshot which also shows the variant with a margin around the buttons.

It looks good IMHO, I'll ask on the mailing list if people have any preference and then come back with a final patch.

Thanks,
   Antonio
Comment 8 Sebastian 2016-08-01 14:30:02 UTC
I would go with "After". Just my personal preference, but I am mostly using window picker I would not be directly affected of that change.

I would like to point out that the spanning on multiple rows might be a feature for some people. In particular for people with lots of open windows. I think I even recall a discussion about that on the mailing list some time ago. Does it mean that with your patches its no longer possible to get two rows of windows?
Comment 9 Antonio Ospite 2016-08-01 15:11:31 UTC
I have to say that I too prefer the version without the margins.

While testing the two variants I found a difference also from an usability point of view: when the mouse pointer is at the bottom edge of the screen, if the button has a margin it won't get the click event.

It may be subjective but I find this a little annoying because it forces me to aim better, while I usually just go on the bottom edge and only aim horizontally.

If people prefer the version with margins this issue can be alleviated by not having a margin on the bottom, but then the look is a bit asymmetric.

About spanning multiple rows: that also was forcing me to aim more precisely, while with one row of buttons I can be more approximate. So I prefer having one row, even for 48px panels.

Anyways, I tried and the list ow windows will still span on multiple rows when the panel size is >= 64 pixels.

Thanks for the feedback,
   Antonio
Comment 10 Antonio Ospite 2016-08-24 09:00:17 UTC
Created attachment 334053 [details] [review]
Improve the tasklist style v2

OK, I am attaching a v2 of the version without margins, which has got twice as much votes than the one with margins (2 vs. 1 ...).

Changes since v1: added missing white space after colons, added an explicit border color.

Thanks,
   Antonio
Comment 11 Alberts Muktupāvels 2016-08-24 09:25:04 UTC
Review of attachment 334053 [details] [review]:

What is X-Face? It is enough to just add bug link, please without 'Fixes' part.
Comment 12 Antonio Ospite 2016-08-24 09:57:22 UTC
(In reply to Alberts Muktupāvels from comment #11)
> Review of attachment 334053 [details] [review] [review]:
> 
> What is X-Face? It is enough to just add bug link, please without 'Fixes'
> part.

An X-Face is a way to represent a small bitmap image in a textual format: http://www.dairiki.org/xface/

Some email clients (and web archives of mailing lists) can decode X-Face headers in emails and display the actual image; such a header is present in my patches because I usually submit patches with git-send-email and so I configured git to put my logo as an X-Face header in patches automatically when running git-format-patch.

Bottom line: just ignore it.

Should I send a v3 to remove the "Fixes" bit, or will you amend the commit message locally?

Thanks,
   Antonio
Comment 13 Alberts Muktupāvels 2016-08-24 10:19:59 UTC
Review of attachment 334053 [details] [review]:

I think that variant with margin will work better. Remember that panel can be used also vertically.

::: data/theme/Adwaita/gnome-panel.css
@@ +84,3 @@
+  text-shadow: 0 1px rgba(255, 255, 255, 0.76923);
+  -gtk-icon-shadow: 0 1px rgba(255, 255, 255, 0.76923);
+  box-shadow: inset 0 1px rgba(255, 255, 255, 0.8);

Default padding is 4px 8px and I think it is too big for tasklist button!

@@ +106,3 @@
+
+#tasklist-button:first-child {
+  border-width: 1px; /* the first child has a border also on the left */

This does not work if buttons are in two ore more lines.
Comment 14 Antonio Ospite 2016-08-25 15:21:52 UTC
Created attachment 334154 [details] [review]
Improve the tasklist style v3

OK, here is the version with margins.

I explained why I think that usability-wise having no margins is slightly better (at least for a bottom panel), but I agree that the version with margins _looks_ more refined.

Changes since v2:
  - paddings are now explicitly set to 2px 4px
  - no more special treatment for the first child
  - 1px margin

I tested the patch with vertical panels too and it looks OK.

BTW I noticed that gnome-panel fails to expand the content vertically sometimes, but this is unrelated to the theme patch.

Thanks,
   Antonio
Comment 15 Antonio Ospite 2016-08-25 15:23:31 UTC
(In reply to Antonio Ospite from comment #14)

[...]
> BTW I noticed that gnome-panel fails to expand the content vertically
> sometimes, but this is unrelated to the theme patch.
> 

I mean when vertical panels are used.
Comment 16 Alberts Muktupāvels 2016-09-28 18:57:30 UTC
I know that there is problem with vertical panel, but since my plan is to write new panel code I have not tried to solve problem...

About patch:
- I think that text for inactive windows are too light when using light theme.
- Do we really need effects for icons? Is not enough to just change border and/or background and/or text color?

About version without margin:
Style for vertical panel probably can be fixed by changing button style with:
.vertical #tasklist-button { ... }

Then only problem remains with horizontal panel when items are placed in two (or more?) rows...
Comment 17 Antonio Ospite 2016-09-30 12:01:46 UTC
(In reply to Alberts Muktupāvels from comment #16)
> I know that there is problem with vertical panel, but since my plan is to
> write new panel code I have not tried to solve problem...
>

I see.

> About patch:
> - I think that text for inactive windows are too light when using light
> theme.
> - Do we really need effects for icons? Is not enough to just change border
> and/or background and/or text color?
>

I think I just took the button style from the libgtk theme and copied it. That's why it is like that.

> About version without margin:
> Style for vertical panel probably can be fixed by changing button style with:
> .vertical #tasklist-button { ... }
> 
> Then only problem remains with horizontal panel when items are placed in two
> (or more?) rows...

I'd say let's go with the version with margins for 3.22, which would be already a grat improvement compared to the current situation; and if I have time, I'll try to sort out the issues with the margin-less variant for 3.24.
Comment 18 Alberts Muktupāvels 2016-10-06 14:21:37 UTC
(In reply to Antonio Ospite from comment #17)
> I'd say let's go with the version with margins for 3.22, which would be
> already a grat improvement compared to the current situation; and if I have
> time, I'll try to sort out the issues with the margin-less variant for 3.24.

Ok, but I still would like that this problem is fixed:
"I think that text for inactive windows are too light when using light theme."
Comment 19 Antonio Ospite 2016-10-10 21:16:09 UTC
Created attachment 337357 [details]
Remove the white text-shadow and use a darker color on :hover

(In reply to Alberts Muktupāvels from comment #18)
> (In reply to Antonio Ospite from comment #17)
> > I'd say let's go with the version with margins for 3.22, which would be
> > already a grat improvement compared to the current situation; and if I have
> > time, I'll try to sort out the issues with the margin-less variant for 3.24.
> 
> Ok, but I still would like that this problem is fixed:
> "I think that text for inactive windows are too light when using light
> theme."

It is the same color used by the gtk Adwaita theme for inactive/backdrop buttons and notebook tabs, so I would leave it that way for consistency.

Removing the white text-shadow and adding a darker color for the :hover pseudoclass, should improve the style a little bit while still keeping the same colors as the gtk theme.

BTW Alberts, for these quick discussions IRC could work better, what about a #gnome-flashback channel?

Ciao ciao,
   Antonio
Comment 20 Antonio Ospite 2016-11-04 15:50:28 UTC
Ping.

Is the style in comment #19 acceptable? It still has the light text on unfocused buttons, but it makes the text darker on hover.

If you really want a darker text for unfocused buttons I can do that of course, I was just noticing what it will be different from the default buttons style.

Thanks,
   Antonio
Comment 21 Alberts Muktupāvels 2016-11-09 16:44:06 UTC
(In reply to Antonio Ospite from comment #19)
> Created attachment 337357 [details]
> Remove the white text-shadow and use a darker color on :hover
> 
> (In reply to Alberts Muktupāvels from comment #18)
> > (In reply to Antonio Ospite from comment #17)
> > > I'd say let's go with the version with margins for 3.22, which would be
> > > already a grat improvement compared to the current situation; and if I have
> > > time, I'll try to sort out the issues with the margin-less variant for 3.24.
> > 
> > Ok, but I still would like that this problem is fixed:
> > "I think that text for inactive windows are too light when using light
> > theme."
> 
> It is the same color used by the gtk Adwaita theme for inactive/backdrop
> buttons and notebook tabs, so I would leave it that way for consistency.

But panels are not regular windows/applications.

> Removing the white text-shadow and adding a darker color for the :hover
> pseudoclass, should improve the style a little bit while still keeping the
> same colors as the gtk theme.

Hover state definitely feels better in screenshot, but I still think that unfocused button text is too light.

Maybe color (that you have for hover state in screenshot) might be same for unfocused and hovered buttons and in hover state only change button background?

> BTW Alberts, for these quick discussions IRC could work better, what about a
> #gnome-flashback channel?

I have no idea how to create new channels and where to do that...
Comment 22 Antonio Ospite 2016-11-11 12:41:11 UTC
Created attachment 339619 [details]
final comparison of the new tasklist style for the light theme

(In reply to Alberts Muktupāvels from comment #21)
> (In reply to Antonio Ospite from comment #19)
[...]
>
> Hover state definitely feels better in screenshot, but I still think that
> unfocused button text is too light.
>
> Maybe color (that you have for hover state in screenshot) might be same for
> unfocused and hovered buttons and in hover state only change button
> background?
>

OK, I used the darker gray for the unfocused button, and used the same black color for the hovered and active button label.

I did it this way because using only the background for the transition unfocused->hover was too subtle, while using only the background for hover->active seemed clear enough to me.

See the attached image.

I am attaching a patch in the next comment.

> > BTW Alberts, for these quick discussions IRC could work better, what about a
> > #gnome-flashback channel?
> 
> I have no idea how to create new channels and where to do that...

Gnome channels are usually on GIMPNet (irc.gnome.org) I already created a #gnome-flashback channel.

Thanks,
   Antonio
Comment 23 Antonio Ospite 2016-11-11 12:42:53 UTC
Created attachment 339620 [details] [review]
theme: improve the tasklist style
Comment 24 Antonio Ospite 2017-03-05 18:12:14 UTC
Created attachment 347274 [details] [review]
style the box inside the button instead of the button itself

The attached patch makes the click event work also on the edges of the panel, without changing the current look of the tasklist.