GNOME Bugzilla – Bug 724096
search-bar: don't show the widget until we're ready to reveal
Last modified: 2018-02-13 16:16:28 UTC
Apps that use a searchbar have a spurious border visible when the searchbar isn't revealed. You can see this in devhelp or in gtk demo.
Created attachment 268753 [details] [review] search-bar: don't show the widget until we're ready to reveal Otherwise we leave a border visible.
After debugging a little, the problem here is that we enforce the allocation of visible widgets to be at least 1x1. This is a historic relic from when every widget had a window (X11 windows must be at least 1x1). The real fix here is to take out that restriction. The core of GTK+ should not have any assumptions about minimum widget size, and window widgets should just request a suitable minimum size.
This problem has 4 duplicates in totem's repo. Could we use Jon's hack until we really fix it?
*** Bug 738354 has been marked as a duplicate of this bug. ***
https://github.com/GNOME/gtk/commit/8fcf3a8e882844023b0118b7d47cb2bd556623fd This commit does not work for me. I still get search bar border leak. I made a patch for this.
Created attachment 292039 [details] [review] Only add search-bar style class when revealed
Created attachment 292040 [details] Screenshot
The patch is not perfect. Need better solution.
I'm confused about the status of this bug. 1. The status is fixed, but I don't see any committed patches, and Trinh Anh Ngoc is apparently still working on it. Is it fixed or not? 2. The screenshot in comment #7 doesn't seem to actually show the search bar or the problem as reported (since the problem is only apparent when the search bar is supposed to be hidden).
Allan. That screenshot was taken after applying my patch. Matthias Clasen with his commit: https://github.com/GNOME/gtk/commit/8fcf3a8e882844023b0118b7d47cb2bd556623fd But it didn't solve the problem.
*** Bug 754243 has been marked as a duplicate of this bug. ***
We're moving to gitlab! As part of this move, we are moving bugs to NEEDINFO if they haven't seen activity in more than a year. If this issue is still important to you and still relevant with GTK+ 3.22 or master, please reopen it and we will migrate it to gitlab.
I took screenshots of devhelp with and without the patch, and there were no differences visible using devhelp. Trinh, please reopen if the problem persists, and update your patch as well. Thanks!