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 761760 - Welcome graphic and heading is misaligned
Welcome graphic and heading is misaligned
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: Other
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 760317 762442 769424 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-02-09 12:10 UTC by Allan Day
Modified: 2016-08-02 19:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
screenshot (1.93 MB, image/png)
2016-02-09 12:10 UTC, Allan Day
  Details
Screenshot after removing a connection (16.71 KB, image/png)
2016-02-18 12:41 UTC, Florian Müllner
  Details
Reproducer for the issue (2.85 KB, text/plain)
2016-02-18 16:33 UTC, Florian Müllner
  Details
revealer: Don't assume a child orientation for 'none' transition (1.44 KB, patch)
2016-02-18 16:53 UTC, Florian Müllner
accepted-commit_now Details | Review
photos screenshot (1.11 MB, image/png)
2016-02-19 11:05 UTC, Allan Day
  Details
revealer: Don't report >0 preferred width... (2.21 KB, patch)
2016-02-19 12:29 UTC, Timm Bäder
committed Details | Review

Description Allan Day 2016-02-09 12:10:42 UTC
Created attachment 320703 [details]
screenshot

Testing 3.19.x with GNOME Continuous from four days ago: the content of the welcome screen isn't centered. The whole thing looks like it is shifted too far to the right.

See attached screenshot.
Comment 1 Florian Müllner 2016-02-09 14:01:19 UTC
(In reply to Allan Day from comment #0)
> The whole thing looks like it is shifted too far to the right.

Mmmh, that actually looks like the position would be correct if the room list was visible.
Comment 2 Allan Day 2016-02-18 09:52:08 UTC
(In reply to Florian Müllner from comment #1)
> (In reply to Allan Day from comment #0)
> > The whole thing looks like it is shifted too far to the right.
> 
> Mmmh, that actually looks like the position would be correct if the room
> list was visible.

In-app notifications are also misaligned by the same amount - so it's not just the graphic that's effected.
Comment 3 Florian Müllner 2016-02-18 10:18:51 UTC
Wait, in-app notifications? I don't see a case where we would show a notification in the empty state, so something's really fishy there. Maybe there's something in the journal that helps figuring out what that might be?

(For what it's worth, I'm not seeing that issue when I disable all accounts - the sidebar is properly hidden here and the placeholder centered)
Comment 4 Allan Day 2016-02-18 12:06:35 UTC
(In reply to Florian Müllner from comment #3)
> Wait, in-app notifications? I don't see a case where we would show a
> notification in the empty state ...

Try removing the only connection: Polari reverts to the empty state and shows a "connection removed" in-app notification.
Comment 5 Florian Müllner 2016-02-18 12:41:39 UTC
Created attachment 321582 [details]
Screenshot after removing a connection

(In reply to Allan Day from comment #4)
> Try removing the only connection: Polari reverts to the empty state and
> shows a "connection removed" in-app notification.

Yes, but both placeholder and notification are properly centered for me in that case - see screenshot.

I did download the continuous image now, I'll try to reproduce the issue with that later (got to commute to the office and take care of mutter/gnome-shell releases first though)
Comment 6 Florian Müllner 2016-02-18 13:58:41 UTC
I suspect this is a GTK+ issue - I can reproduce the issue when I disable animations (as is default in a VM). Somehow the sidebar is *drawn* correctly (read: slid out), but takes up the space as if it was revealed.
Comment 7 Florian Müllner 2016-02-18 16:33:29 UTC
Created attachment 321600 [details]
Reproducer for the issue
Comment 8 Florian Müllner 2016-02-18 16:53:09 UTC
Created attachment 321603 [details] [review]
revealer: Don't assume a child orientation for 'none' transition

It is safe to assume that the child should shrink vertically when
the transition is a vertical slide (up or down), and horizontally
for a horizontal slide (left or right), but picking one direction
when there is no transition is problematic - in that case the child
should either be fully visible or fully hidden, no matter its
actual orientation. Simply allowing the child to shrink in either
direction should be much more likely to get us the expected result.
Comment 9 Florian Müllner 2016-02-18 16:55:12 UTC
The attached patch fixes the issue for me, but triggers some warnings in testrevealer, so suggestions welcome.
Comment 10 Allan Day 2016-02-19 11:05:43 UTC
Created attachment 321649 [details]
photos screenshot

Looks like this issue is affecting Photos too.
Comment 11 Timm Bäder 2016-02-19 12:22:06 UTC
The problem with that patch is that you now don't have any size to base the child size on -- i.e. the problem is that there's no TRANSITION_TYPE_NONE_VERTICAL vs. TRANSITION_TYPE_NONE_HORIZONTAL :)

One potential way around this is another case in gtk_revealer_get_child_allocation that just sets both heigth and width of child_allocation *and* Florian's patch, so the minimum size of the child is kept when allocating it, but the preferred size of the revealer shrinks to 0.
Comment 12 Timm Bäder 2016-02-19 12:29:43 UTC
Created attachment 321653 [details] [review]
revealer: Don't report >0 preferred width...

... if the child is concealed and the transition type is set to NONE.
In this case, both preferred width and preferred height should be 0, but we still can't use that to allocate a size for the child, so care about
the minimum size of the child in gtk_revealer_get_child_allocation.
Comment 13 Jonas Danielsson 2016-02-22 14:34:56 UTC
We are seeing something similar in Maps, but we have TRANSITION_TYPE_SLIDE_LEFT...

it is the bug: https://bugzilla.gnome.org/show_bug.cgi?id=762442
Comment 14 Timm Bäder 2016-02-22 14:37:12 UTC
I was under the impression that all these "continuous only" bugs exist because Continuous doesn't do transitions, so all revealers are automatically TRANSITION_TYPE_NONE.
Comment 15 Jonas Danielsson 2016-02-22 14:38:27 UTC
(In reply to Timm Bäder from comment #14)
> I was under the impression that all these "continuous only" bugs exist
> because Continuous doesn't do transitions, so all revealers are
> automatically TRANSITION_TYPE_NONE.

A might be, I will give your patch a spin to see if it fixes this. And yes my case is under Boxes and VirtualBox where gtk-enable-animations is FALSE so that might equate TRANSISTION_TYPE_NONE?
Comment 16 Timm Bäder 2016-02-22 14:42:46 UTC
Should be, since the effective transition is _NONE in case gtk-enable-animations is FALSE: https://git.gnome.org/browse/gtk+/tree/gtk/gtkrevealer.c#n297
Comment 17 Jonas Danielsson 2016-02-22 15:18:09 UTC
It did the trick! Thank you! With that patch the sidebar-revealer behaves fine in VirtualBox!
Comment 18 Jonas Danielsson 2016-02-22 15:18:16 UTC
*** Bug 762442 has been marked as a duplicate of this bug. ***
Comment 19 Jonas Danielsson 2016-02-22 15:51:44 UTC
*** Bug 760317 has been marked as a duplicate of this bug. ***
Comment 20 Matthias Clasen 2016-02-22 16:21:39 UTC
Patches seem to work fine to me. It would be great to add test testcase to tests/ in gtk+ too, just so we keep it around
Comment 21 Matthias Clasen 2016-02-22 16:23:06 UTC
Review of attachment 321603 [details] [review]:

ok
Comment 22 Matthias Clasen 2016-02-22 16:40:23 UTC
Review of attachment 321653 [details] [review]:

ok
Comment 23 Timm Bäder 2016-02-22 17:13:23 UTC
fwiw you can see the effect in tests/testrevealer already since now clicking on the "None" button in the upper left or on the "Right" button in the center left resizes the window by a few pixels, which it previously didn't because the None revealer in the upper left still requested the entry's size.

After writing that patch I did however also write this test case: http://paste.fedoraproject.org/325861/00264145/ but Benjamin told me I could have as well written a few ref tests
Comment 24 Matthias Clasen 2016-02-24 01:58:42 UTC
Attachment 321653 [details] pushed as 0c25c5d - revealer: Don't report >0 preferred width...
Comment 25 Jonas Danielsson 2016-08-02 14:25:03 UTC
*** Bug 769424 has been marked as a duplicate of this bug. ***
Comment 26 Jeremy Bicha 2016-08-02 19:20:42 UTC
Hi, this bug was triggered here in Ubuntu GNOME 16.04.1 LTS by gnome-maps 3.18.3. Please cherry-pick the commit to the gtk-3-18 branch.