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 733979 - Combobox is styled like the last child if linked class applied, even if it's the first child
Combobox is styled like the last child if linked class applied, even if it's ...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Class: GtkStyleContext
3.13.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-07-30 13:51 UTC by Kiran
Modified: 2014-08-18 08:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Image of the issue, see the combobox which is the first child in this screenshot (3.88 KB, image/png)
2014-07-30 13:51 UTC, Kiran
Details

Description Kiran 2014-07-30 13:51:57 UTC
Created attachment 282064 [details]
Image of the issue, see the combobox which is the first child in this screenshot

When adding the linked class to the parent widget of a combobox, the combobox gets styled like it's the last child even if it's the first child.
Comment 1 Lapo Calamandrei 2014-07-31 21:41:06 UTC
The screenshot doesn't seem like 3.13, it *should* work with the latest version (untested btw)
Comment 2 Kiran 2014-08-01 02:43:18 UTC
I have tried with gtk 3.13.6 and I still have this issue.
Comment 3 Daniel Fore 2014-08-01 02:59:24 UTC
I can confirm the issue with gtk 3.13.6 + git
Comment 4 Lapo Calamandrei 2014-08-01 10:28:14 UTC
Is there something I can test the style against? That would be really helpfull to fix this
Comment 5 Lapo Calamandrei 2014-08-01 13:17:33 UTC
unfortunatelly this is not a theme problem, playing with glade with the combination combobox+entry in a gtkbox, I can select the combo with say ".linked .button:last-child {}", so clearly it picks the wrong style from the theme. Reassigning to GtkStyleContext.
Comment 7 Lapo Calamandrei 2014-08-02 11:58:47 UTC
I think this can actually be worked around within the theme, but I'm not that confortable in doing that. Let's say if we don't get a fix for the final gtk+ release *and* I get thumbs up from Matthias, I'll add the "fix" in Adwaita.
Comment 8 Matthias Clasen 2014-08-03 08:51:24 UTC
(In reply to comment #5)
> unfortunatelly this is not a theme problem, playing with glade with the
> combination combobox+entry in a gtkbox, I can select the combo with say
> ".linked .button:last-child {}", so clearly it picks the wrong style from the
> theme. Reassigning to GtkStyleContext.

I don't think thats true, really. The problem here is that the combobox has inner structure, I think. And the button inside is not a direct child of the .linked style box.

Try this:


.linked > GtkComboBox:first-child > .button {
    border-radius: 3px 0 0 3px;
    border-left-style: solid;
}
Comment 9 Matthias Clasen 2014-08-03 09:07:13 UTC
I've added an example of linked comboboxes to widget-factory
Comment 10 Daniel Fore 2014-08-04 00:49:57 UTC
Matthias I can confirm that your fix works! Thanks :)
Comment 11 Lapo Calamandrei 2014-08-04 12:10:37 UTC
Nice
Comment 12 Matthias Clasen 2014-08-13 22:13:00 UTC
Daniel, if you want to send that $35 bounty to the GNOME foundation, that would be perfectly fine with me. Same for any other bugs I close that might have a bounty associated.
Comment 13 Kiran 2014-08-13 22:48:26 UTC
Please can you close this bug so the bounty can be claimed?