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 754565 - listbox styling issues
listbox styling issues
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: wizard
3.17.x
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
GNOME Boxes maintainer(s)
Depends on: 754568
Blocks:
 
 
Reported: 2015-09-04 10:33 UTC by Jakub Steiner
Modified: 2016-09-20 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot illustrating both the separators and completele lack of corner rounding (27.78 KB, image/png)
2015-09-04 10:35 UTC, Jakub Steiner
  Details
corner rounding working on another page (26.53 KB, image/png)
2015-09-04 10:35 UTC, Jakub Steiner
  Details
rewrite wizard styling (5.23 KB, patch)
2015-09-09 15:36 UTC, Lapo Calamandrei
none Details | Review
css wizard rewrite (5.23 KB, patch)
2015-09-09 21:56 UTC, Lapo Calamandrei
none Details | Review
css wizard rewrite (4.15 KB, patch)
2015-09-15 16:12 UTC, Lapo Calamandrei
none Details | Review
style: Drop custom 'boxes-property-name-label' class (3.11 KB, patch)
2015-09-16 16:08 UTC, Zeeshan Ali
committed Details | Review
style: Add a comment to boxes-step-label class (734 bytes, patch)
2015-09-16 16:08 UTC, Zeeshan Ali
committed Details | Review
style: Make use of dim-label class (3.77 KB, patch)
2015-09-16 16:08 UTC, Zeeshan Ali
none Details | Review
style: Prettier media subtitles in wizard (791 bytes, patch)
2015-09-16 16:09 UTC, Zeeshan Ali
none Details | Review
style: Drop redundant theme classes (4.14 KB, patch)
2015-09-16 16:09 UTC, Zeeshan Ali
none Details | Review
style: Prettier logos legal notice (698 bytes, patch)
2015-09-16 16:09 UTC, Zeeshan Ali
none Details | Review
style: Fix & beautify wizard media menu (3.32 KB, patch)
2015-09-16 16:09 UTC, Zeeshan Ali
none Details | Review
style: Group all wizard classes at the end (1.51 KB, patch)
2015-09-16 16:09 UTC, Zeeshan Ali
none Details | Review
style: Make use of dim-label class (2.04 KB, patch)
2015-09-16 17:03 UTC, Zeeshan Ali
committed Details | Review
style: Prettier media subtitles in wizard (791 bytes, patch)
2015-09-16 17:03 UTC, Zeeshan Ali
committed Details | Review
style: Drop redundant theme classes (4.14 KB, patch)
2015-09-16 17:04 UTC, Zeeshan Ali
committed Details | Review
style: Prettier logos legal notice (698 bytes, patch)
2015-09-16 17:04 UTC, Zeeshan Ali
committed Details | Review
style: Fix & beautify wizard media menu (3.32 KB, patch)
2015-09-16 17:05 UTC, Zeeshan Ali
committed Details | Review
style: Group all wizard classes at the end (1.51 KB, patch)
2015-09-16 17:05 UTC, Zeeshan Ali
committed Details | Review

Description Jakub Steiner 2015-09-04 10:33:49 UTC
The listbox in the 'new box' dialog has a couple of quirks:

- the separator is styled as a raised line, having a highlight line followed by a shadow/dark line.
- the corner rounding is inconsistant. The styling is applied on first and last child, yet some pages, like the initial source selection have labels on those positions, losing the border rounding.



Possible solutions/worarounds - use a special class for the first and last items or always having a non-interactive label on those positions and have then blank at places, to keep nth-child(2) nth-last-child(2) working.
Comment 1 Jakub Steiner 2015-09-04 10:35:18 UTC
Created attachment 310657 [details]
screenshot illustrating both the separators and completele lack of corner rounding
Comment 2 Jakub Steiner 2015-09-04 10:35:37 UTC
Created attachment 310658 [details]
corner rounding working on another page
Comment 3 Lapo Calamandrei 2015-09-04 12:18:04 UTC
nth-child(2) is not needed, the boxes-menu-row's in the scrolled window are actually inside a box, so boxes-menu-row:first-child {} catches the first, we should tweak the overshoots on that scrolled window to make the whole thing less ugly when that overflows, but that's another issue.
Comment 4 Lapo Calamandrei 2015-09-09 15:36:51 UTC
Created attachment 311003 [details] [review]
rewrite wizard styling

The css contained quite a bit of cruft accumulated over the years, so I rewrote the whole wizard styling istead of just fixing this particular issue, letting things we now do in adwaita be inherited istead of adding custom css. Also there I tried to comment things to make the whole thing clearer so hopefully the next time a css change is needed it would be hopefully less painfull than this one...
Comment 5 Zeeshan Ali 2015-09-09 18:49:58 UTC
Review of attachment 311003 [details] [review]:

::: data/gtk-style.css
@@ +5,2 @@
 .boxes-snapshot-list-row {
+  border-bottom: 1px solid @borders;

Let's not use this patch for changing the coding style of the css please. :)
Comment 6 Lapo Calamandrei 2015-09-09 21:49:50 UTC
Well, that's the coding style we use in Adwaita, it's pretty automatic to write like that for me so the new code was formatted that way. Being the old css less than the new one it was faster to refactor that.
Comment 7 Lapo Calamandrei 2015-09-09 21:56:14 UTC
Created attachment 311025 [details] [review]
css wizard rewrite

4 spaces indent formatted patch. 
Btw Zeeshan since you clearly don't look at boxes css, why the fsck do you care about the coding style?! :-)
Comment 8 Zeeshan Ali 2015-09-10 12:16:43 UTC
(In reply to Lapo Calamandrei from comment #7)
> Created attachment 311025 [details] [review] [review]
> css wizard rewrite
> 
> 4 spaces indent formatted patch. 
> Btw Zeeshan since you clearly don't look at boxes css,

I do! And I still don't think that small CSS file is nearly as ugly as you assert. :)

> why the fsck do you
> care about the coding style?! :-)

It was not just about coding-style but also the fact that those coding-style changes were prettty irrelevant to this patch. Please see this nice document from Lasse about why atomic commits are important: http://coala.readthedocs.org/en/latest/Getting_Involved/Writing_Good_Commits/
Comment 9 Zeeshan Ali 2015-09-10 12:19:58 UTC
Review of attachment 311025 [details] [review]:

::: data/gtk-style.css
@@ +5,2 @@
 .boxes-snapshot-list-row {
+  border-bottom: 1px solid @borders;

Not sure what you changed in the patch but this (and other lines below) are still coding style changes.
Comment 10 Zeeshan Ali 2015-09-15 13:05:26 UTC
(In reply to Zeeshan Ali (Khattak) from comment #9)
> Review of attachment 311025 [details] [review] [review]:
> 
> ::: data/gtk-style.css
> @@ +5,2 @@
>  .boxes-snapshot-list-row {
> +  border-bottom: 1px solid @borders;
> 
> Not sure what you changed in the patch but this (and other lines below) are
> still coding style changes.

Where did you go dude? As I said before, if you don't have time to clean-up patches, just let me know and I can try to help with that.
Comment 11 Lapo Calamandrei 2015-09-15 16:12:45 UTC
Created attachment 311387 [details] [review]
css wizard rewrite

Sorry pal, last time I uploaded the wrong patch (read the very same one which was obsoleted...), this is the good one.
Comment 12 Zeeshan Ali 2015-09-16 12:41:06 UTC
Review of attachment 311387 [details] [review]:

::: data/gtk-style.css
@@ +116,2 @@
+/* this looks very wrong FIXME by fixing the code
+   it should just probably be a 'dim-label' */

* FIXME is the comment itself, right? Unless you meant to say "workaround"? Why does it look wrong? 

* So why are we not using dim-label then?

* Why are you moving these lines below?
Comment 13 Zeeshan Ali 2015-09-16 12:48:09 UTC
Review of attachment 311387 [details] [review]:

::: data/gtk-style.css
@@ +116,2 @@
+/* this looks very wrong FIXME by fixing the code
+   it should just probably be a 'dim-label' */

Ah now I get it! You started a new sentence without a '.' at the end of last one so I read it as one. :( I thought you knew enough Vala to `sed s/boxes-property-name-label/dim-label/`. :)
Comment 14 Lapo Calamandrei 2015-09-16 15:10:38 UTC
I moved that there since it's in the wizard section, the stuff is organized by order of appearance, when technically possible and when makes sense, to make it easier to grok the code, I didn't change the vala code since I didn't had time for it, it's ugly since it abuses a color we use for unfocused windows completelly out of context.
Comment 15 Zeeshan Ali 2015-09-16 16:08:09 UTC
Created attachment 311475 [details] [review]
style: Drop custom 'boxes-property-name-label' class

Just use 'dim-label'.

Based on a patch from Lapo Calamandrei <calamandrei@gmail.com>.
Comment 16 Zeeshan Ali 2015-09-16 16:08:18 UTC
Created attachment 311476 [details] [review]
style: Add a comment to boxes-step-label class

Based on a patch from Lapo Calamandrei <calamandrei@gmail.com>.
Comment 17 Zeeshan Ali 2015-09-16 16:08:32 UTC
Created attachment 311477 [details] [review]
style: Make use of dim-label class

Instead of hardcoding color.

Based on a patch from Lapo Calamandrei <calamandrei@gmail.com>.
Comment 18 Zeeshan Ali 2015-09-16 16:09:03 UTC
Created attachment 311478 [details] [review]
style: Prettier media subtitles in wizard

Based on a patch from Lapo Calamandrei <calamandrei@gmail.com>.
Comment 19 Zeeshan Ali 2015-09-16 16:09:15 UTC
Created attachment 311479 [details] [review]
style: Drop redundant theme classes

Based on a patch from Lapo Calamandrei <calamandrei@gmail.com>.
Comment 20 Zeeshan Ali 2015-09-16 16:09:28 UTC
Created attachment 311480 [details] [review]
style: Prettier logos legal notice

Based on a patch from Lapo Calamandrei <calamandrei@gmail.com>.
Comment 21 Zeeshan Ali 2015-09-16 16:09:38 UTC
Created attachment 311481 [details] [review]
style: Fix & beautify wizard media menu
Comment 22 Zeeshan Ali 2015-09-16 16:09:47 UTC
Created attachment 311482 [details] [review]
style: Group all wizard classes at the end

Let's group all wizard classes together at the bottom of the CSS file to
clean it up a bit.

Based on a patch from Lapo Calamandrei <calamandrei@gmail.com>.
Comment 23 Zeeshan Ali 2015-09-16 17:03:31 UTC
Created attachment 311493 [details] [review]
style: Make use of dim-label class

Instead of hardcoding color.

Based on a patch from Lapo Calamandrei <calamandrei@gmail.com>.
Comment 24 Zeeshan Ali 2015-09-16 17:03:44 UTC
Created attachment 311494 [details] [review]
style: Prettier media subtitles in wizard

Based on a patch from Lapo Calamandrei <calamandrei@gmail.com>.
Comment 25 Zeeshan Ali 2015-09-16 17:04:45 UTC
Created attachment 311495 [details] [review]
style: Drop redundant theme classes

Based on a patch from Lapo Calamandrei <calamandrei@gmail.com>.
Comment 26 Zeeshan Ali 2015-09-16 17:04:55 UTC
Created attachment 311496 [details] [review]
style: Prettier logos legal notice

Based on a patch from Lapo Calamandrei <calamandrei@gmail.com>.
Comment 27 Zeeshan Ali 2015-09-16 17:05:03 UTC
Created attachment 311497 [details] [review]
style: Fix & beautify wizard media menu
Comment 28 Zeeshan Ali 2015-09-16 17:05:14 UTC
Created attachment 311498 [details] [review]
style: Group all wizard classes at the end

Let's group all wizard classes together at the bottom of the CSS file to
clean it up a bit.

Based on a patch from Lapo Calamandrei <calamandrei@gmail.com>.
Comment 29 Zeeshan Ali 2015-09-16 17:07:13 UTC
Attachment 311475 [details] pushed as ef910f0 - style: Drop custom 'boxes-property-name-label' class
Attachment 311476 [details] pushed as a5f6cdc - style: Add a comment to boxes-step-label class
Attachment 311493 [details] pushed as 217749f - style: Make use of dim-label class
Attachment 311494 [details] pushed as b273f20 - style: Prettier media subtitles in wizard
Attachment 311495 [details] pushed as ee0b343 - style: Drop redundant theme classes
Attachment 311496 [details] pushed as b689996 - style: Prettier logos legal notice
Attachment 311497 [details] pushed as 35ad873 - style: Fix & beautify wizard media menu
Attachment 311498 [details] pushed as 2250647 - style: Group all wizard classes at the end