diff options
author | Mihai Moldovan <ionic@ionic.de> | 2023-09-04 17:37:25 +0200 |
---|---|---|
committer | Mike Gabriel <mike.gabriel@das-netzwerkteam.de> | 2023-09-11 15:44:04 +0200 |
commit | d29ba9c65ef8729357a121c37cf355d04a2faca2 (patch) | |
tree | 632d833569fb501df54d2d2bb049e91cd1523d84 /tests | |
parent | 35c88c19a881725d2a3d4a4295d4b957ada6c2ea (diff) | |
download | arctica-greeter-d29ba9c65ef8729357a121c37cf355d04a2faca2.tar.gz arctica-greeter-d29ba9c65ef8729357a121c37cf355d04a2faca2.tar.bz2 arctica-greeter-d29ba9c65ef8729357a121c37cf355d04a2faca2.zip |
src/shutdown-dialog.vala: keep dialog size fixed.
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.
Fixes: https://github.com/ArcticaProject/arctica-greeter/issues/58
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions