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 789733 - Adwaita/HC: Fix entry.flat not being flat
Adwaita/HC: Fix entry.flat not being flat
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Themes
3.22.x
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-10-31 19:47 UTC by Daniel Boles
Modified: 2017-11-01 20:26 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adwaita: Fix :backdropped entry becoming non-.flat (3.43 KB, patch)
2017-10-31 19:47 UTC, Daniel Boles
needs-work Details | Review
HighContrast: Fix .flat entry not being flat (4.06 KB, patch)
2017-10-31 19:59 UTC, Daniel Boles
needs-work Details | Review
HighContrast: Fix GtkEntry:has-frame not working (4.27 KB, patch)
2017-10-31 20:42 UTC, Daniel Boles
committed Details | Review
Adwaita: Fix Entry:has-frame if backdrop/disabled (3.80 KB, patch)
2017-10-31 20:42 UTC, Daniel Boles
committed Details | Review

Description Daniel Boles 2017-10-31 19:47:21 UTC
The other selectors on :backdrop were overriding that on .flat and leading to
the border reappearing and whatnot. Fix that by explicitly applying the .flat
style to entry:backdrop also, as we already do for :focus.
Comment 1 Daniel Boles 2017-10-31 19:47:26 UTC
Created attachment 362691 [details] [review]
Adwaita: Fix :backdropped entry becoming non-.flat

by explicitly including &:backdrop in the selector removing the border.
Comment 2 Daniel Boles 2017-10-31 19:48:46 UTC
It also seems that in HC, .flat entries are simply never flat, even if not backdropped.
Comment 3 Daniel Boles 2017-10-31 19:52:08 UTC
(In reply to Daniel Boles from comment #2)
> It also seems that in HC, .flat entries are simply never flat, even if not
> backdropped.

*removes focus from entry before testing* It's not quite so bad: backdrop ones are OK, but foreground ones need the internal shadow removed.
Comment 4 Daniel Boles 2017-10-31 19:56:37 UTC
I see why I originally thought .flat never worked in HC: it doesn't on entry:disabled. That'll need a precedence bump too. I'd better check other pseudoclasses while I'm at it.
Comment 5 Daniel Boles 2017-10-31 19:59:40 UTC
Created attachment 362692 [details] [review]
HighContrast: Fix .flat entry not being flat

• Remove the box-shadow at the top when the entry is in the foreground
• Bump precedence so that :disabled entries do not have .flat overridden
Comment 6 Daniel Boles 2017-10-31 20:35:11 UTC
Review of attachment 362691 [details] [review]:

This also needs to cover :disabled and :backdrop:disabled.

At this point I begin to wonder whether there's a better solution than just throwing extra selectors at it. Any thoughts, Lapo/Jakub?
Comment 7 Daniel Boles 2017-10-31 20:38:26 UTC
Review of attachment 362692 [details] [review]:

And so it continues. HighContrastInverse still shades the background lighter on entry.flat:backdrop
Comment 8 Daniel Boles 2017-10-31 20:42:12 UTC
Created attachment 362702 [details] [review]
HighContrast: Fix GtkEntry:has-frame not working

• Remove the box-shadow at the top when the entry is in the foreground
• Bump precedence so that :disabled entries do not have .flat overridden
• Also add :backdrop to stop HCInverse getting a lighter BG in :backdrop
Comment 9 Daniel Boles 2017-10-31 20:42:26 UTC
Created attachment 362703 [details] [review]
Adwaita: Fix Entry:has-frame if backdrop/disabled

by explicitly including these in the selector removing the border, to
avoid other rules on these pseudoclasses overriding the .flat class.
Comment 10 Daniel Boles 2017-11-01 20:26:36 UTC
Attachment 362702 [details] pushed as a03a3c3 - HighContrast: Fix GtkEntry:has-frame not working
Attachment 362703 [details] pushed as 40302a5 - Adwaita: Fix Entry:has-frame if backdrop/disabled


Let's just get this fixed, for now, but please do push a preferred way to do it,
if one exists.