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 760482 - GtkFrame cuts off bottom 2 pixels of child
GtkFrame cuts off bottom 2 pixels of child
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 762072 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-01-11 17:27 UTC by Hashem Nasarat
Modified: 2016-02-29 23:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test case (1.53 KB, application/javascript)
2016-01-20 05:28 UTC, Hashem Nasarat
  Details
frame: Measure border gadget separately (4.10 KB, patch)
2016-02-25 16:39 UTC, Timm Bäder
none Details | Review
frame: Let GtkContainer handle border-width (3.46 KB, patch)
2016-02-25 16:40 UTC, Timm Bäder
none Details | Review
frame: Let GtkContainer handle border-width (3.62 KB, patch)
2016-02-25 17:45 UTC, Timm Bäder
accepted-commit_now Details | Review
frame: Measure border gadget separately (4.43 KB, patch)
2016-02-25 17:45 UTC, Timm Bäder
none Details | Review
frame: Measure border gadget separately (4.43 KB, patch)
2016-02-25 18:01 UTC, Timm Bäder
accepted-commit_now Details | Review
frame: Fix horizontal size request (2.29 KB, patch)
2016-02-26 13:18 UTC, Timm Bäder
accepted-commit_now Details | Review

Description Hashem Nasarat 2016-01-11 17:27:19 UTC
shadow-type = none: https://i.imgur.com/deDK21q.png
shadow-type = anything else: https://i.imgur.com/ALg29wY.png

Adding 

    frame > * { padding-bottom: 2px; }

seems to make things look right, but mattias says that's just a workaround and not an actual fix.

Running gtk master.
Comment 1 Lapo Calamandrei 2016-01-11 17:58:59 UTC
Yeah this looks way too hacky to me too :-/
Comment 2 Matthias Clasen 2016-01-16 19:18:27 UTC
Is this still the case with master? Ive fixed another frame size.allocation bug recently.
Comment 3 Hashem Nasarat 2016-01-16 19:50:30 UTC
Still the case.
Comment 4 Matthias Clasen 2016-01-17 15:25:36 UTC
Note that for your particular case, there is no good reason anymore to have a GtkFrame there at all - just let the scrolled window draw the border around the list.
Comment 5 Matthias Clasen 2016-01-17 16:35:40 UTC
I haven't been able to reproduce this problem with my testcases, and I don't know how to make that listbox appear in the maps popover. Can you provide a testcase ?
Comment 6 Hashem Nasarat 2016-01-20 05:28:23 UTC
Created attachment 319401 [details]
test case

If you run with GTK 3.18 then the popover changes size to accommodate the change in GtkFrame size. With GTK 3.19 the popover doesn't change size and instead the contents of the GtkFrame have less room. The effect is emphasized if you increase the border-top-width css property of the GtkFrame.
Comment 7 Matthias Clasen 2016-01-21 01:34:16 UTC
Still need a reproducer that works on my system, I'm afraid
Comment 8 Hashem Nasarat 2016-01-21 01:46:20 UTC
The test case doesn't work for you? This is how it works on my system: http://webm.land/media/ZY67.webm

I'm running an entirely up-to-date jhbuild moduleset.
On the left is 3.19: jhbuild shell; gjs main.js
On the right is 3.18: gjs main.js

(enlarged to better show differences)

Toggling the frame on the right changes the size of the popover
Toggling the frame on the left changes the size of available room for the Frame's child. You can see on the left that the button is 2 pixels too-close to the frame when the frame is visible.
Comment 9 Matthias Clasen 2016-01-22 01:51:14 UTC
no, it works
Comment 10 Matthias Clasen 2016-02-21 06:00:18 UTC
*** Bug 762072 has been marked as a duplicate of this bug. ***
Comment 11 Timm Bäder 2016-02-25 16:39:56 UTC
Created attachment 322393 [details] [review]
frame: Measure border gadget separately
Comment 12 Timm Bäder 2016-02-25 16:40:04 UTC
Created attachment 322394 [details] [review]
frame: Let GtkContainer handle border-width
Comment 13 Timm Bäder 2016-02-25 17:45:34 UTC
Created attachment 322398 [details] [review]
frame: Let GtkContainer handle border-width
Comment 14 Timm Bäder 2016-02-25 17:45:42 UTC
Created attachment 322399 [details] [review]
frame: Measure border gadget separately
Comment 15 Timm Bäder 2016-02-25 18:01:47 UTC
Created attachment 322401 [details] [review]
frame: Measure border gadget separately
Comment 16 Matthias Clasen 2016-02-25 18:39:06 UTC
Review of attachment 322398 [details] [review]:

seems to work well
Comment 17 Matthias Clasen 2016-02-25 18:39:18 UTC
Review of attachment 322398 [details] [review]:

seems to work well
Comment 18 Matthias Clasen 2016-02-25 18:40:16 UTC
Review of attachment 322401 [details] [review]:

yes, looks fine
Comment 19 Timm Bäder 2016-02-25 19:49:49 UTC
Pushed, thanks.
Comment 20 Maxim 2016-02-26 10:10:25 UTC
(In reply to Matthias Clasen from comment #18)
> Review of attachment 322401 [details] [review] [review]:

 After these changes the settings window has been extremely high. And I can not reduce the size of the window.
http://storage1.static.itmages.ru/i/16/0226/h_1456481342_2938878_47a665e193.png
Comment 21 Timm Bäder 2016-02-26 10:22:54 UTC
I can't really judge from that screenshot what app it is or if not one of the other tabs is causing the window size. Is there another place this is happening?
Comment 22 Maxim 2016-02-26 11:26:55 UTC
(In reply to Timm Bäder from comment #21)
> I can't really judge from that screenshot what app it is or if not one of
> the other tabs is causing the window size. Is there another place this is
> happening?

Sorry. I forgot to specify that it is the DeadBeeF player settings window.
I see this problem only in this application. I am trying to understand what the problem is.
Comment 24 Timm Bäder 2016-02-26 11:48:57 UTC
Ok thanks,  I can reproduce and will hopefully find time to look at it later today.
Comment 25 Timm Bäder 2016-02-26 13:18:02 UTC
Created attachment 322462 [details] [review]
frame: Fix horizontal size request

We were adding the border gadget size and the label widget size in any
case, but when calculating the width, we want the maximum of those two,
not the sum.
Comment 26 Maxim 2016-02-26 14:24:00 UTC
(In reply to Timm Bäder from comment #25)
> Created attachment 322462 [details] [review] [review]
> frame: Fix horizontal size request
> 
> We were adding the border gadget size and the label widget size in any
> case, but when calculating the width, we want the maximum of those two,
> not the sum.

Thanks. It's working again.
Comment 27 Matthias Clasen 2016-02-28 16:15:05 UTC
Review of attachment 322462 [details] [review]:

yes