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 742552 - OVER transitions in GtkStack don't obscure old widget until transition is finished
OVER transitions in GtkStack don't obscure old widget until transition is fin...
Status: RESOLVED OBSOLETE
Product: gtk+
Classification: Platform
Component: Widget: Other
3.14.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-01-07 21:01 UTC by David Shea
Modified: 2018-05-02 16:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GtkStack over/under transitions (1.05 KB, text/plain)
2015-01-07 21:01 UTC, David Shea
Details

Description David Shea 2015-01-07 21:01:10 UTC
Created attachment 294062 [details]
GtkStack over/under transitions

Attached a script to demonstrate. The transition from the "top" to "bottom" screen, using GTK_STACK_TRANSITION_TYPE_UNDER_UP, works fine, but the transition from bottom to top, using OVER_DOWN, does not. Both of the labels, the old label on the widget being replaced and the new label on the widget becoming the visible child, are visible at the same time until the transition is finished.

I am using gtk3-3.14.6-1.fc21.x86_64 on Fedora 21.
Comment 1 Matthias Clasen 2015-01-08 02:17:53 UTC
your problem is simply that labels and boxes don't draw background, normally.
replace your labels with entries, and things look as expected.

to fix your actual problem, you should just make sure that the topmost container in each page draws a background, either by using a suitable container or style class or with some custom css.
Comment 2 David Shea 2015-01-08 18:32:53 UTC
(In reply to comment #1)
> either by using a suitable container

If not a box or a grid, then what?

> or style class 

Given the volatility of the provided styles and lack of API documentation for them I'd prefer not to rely on this.

Are you really saying that this is considered expected behavior? Could that be documented?
Comment 3 Matthias Clasen 2015-01-08 19:03:43 UTC
> If not a box or a grid, then what?

If you just want a background, an event box would be an option.

> Given the volatility of the provided styles and lack of API documentation for
> them I'd prefer not to rely on this.

Your choice. Should you reconsider, this line takes care of the problem here:

over_label.get_style_context().add_class("background");

> Are you really saying that this is considered expected behavior? Could that be
> documented?

The fact that labels don't draw background by default is expected, and required for backwards compat.

Whether stack pages should always have an enforced background or not, I'm not sure, which is why I haven't closed this bug yet.
Comment 4 Daniel Boles 2017-10-12 11:48:31 UTC
(In reply to Matthias Clasen from comment #3)
> Whether stack pages should always have an enforced background or not, I'm
> not sure, which is why I haven't closed this bug yet.

I would definitely vote no; there may be legitimate cases where people would want to swap different stack pages over a fixed background, so no background should be enforced. I'd say what we currently have is fine. What do you think nowadays?
Comment 5 GNOME Infrastructure Team 2018-05-02 16:21:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gtk/issues/523.