Previously, the dialog resized whenever the timer was shown or hidden.
We want to avoid this, but unfortunately, GTK doesn't provide a way to hide a widget and retain its size in the parent (for instance, a container).
To work around this, create a new private class FakeHideLabel, subclassing Gtk.Label, that exposes a fake_hide () property. If the property is set to true, the widget is "fake hidden" by changing the draw () method to first draw normally, and then paint everything fully transparent.
The usual hide () and show () methods are not used any longer (other than at widget creation).
Additionally, a dummy text is inserted at widget creation, including setting the widget to "fake hidden", so that text line actually has a size.
While this should work fine visually, this WILL definitely create accessibility issues, which we must fix at a later time.
Previously, the dialog resized whenever the timer was shown or hidden.
We want to avoid this, but unfortunately, GTK doesn't provide a way to hide a widget and retain its size in the parent (for instance, a container).
To work around this, create a new private class
FakeHideLabel
, subclassingGtk.Label
, that exposes afake_hide ()
property. If the property is set to true, the widget is "fake hidden" by changing thedraw ()
method to first draw normally, and then paint everything fully transparent.The usual
hide ()
andshow ()
methods are not used any longer (other than at widget creation).Additionally, a dummy text is inserted at widget creation, including setting the widget to "fake hidden", so that text line actually has a size.
While this should work fine visually, this WILL definitely create accessibility issues, which we must fix at a later time.
Fixes: https://github.com/ArcticaProject/arctica-greeter/issues/58