aboutsummaryrefslogtreecommitdiff
path: root/src/prompt-box.vala
diff options
context:
space:
mode:
authorClement Lefebvre <clement.lefebvre@linuxmint.com>2023-01-13 17:44:38 +0000
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-02-06 12:08:33 +0100
commit2577b8a7f3c9e95749665ee48f28d45cbc02ac9c (patch)
treef1c5b4d25168eb85632f2c3589e7a76dd09c223b /src/prompt-box.vala
parentf026668e8ec52331fd70296fa25e24d0e23eee63 (diff)
downloadarctica-greeter-2577b8a7f3c9e95749665ee48f28d45cbc02ac9c.tar.gz
arctica-greeter-2577b8a7f3c9e95749665ee48f28d45cbc02ac9c.tar.bz2
arctica-greeter-2577b8a7f3c9e95749665ee48f28d45cbc02ac9c.zip
sessions: Add a tooltip on the session badge.
Ported from Slick Greeter ported by Mike Gabriel. https://github.com/linuxmint/slick-greeter/commit/cf3742cf155e0925904c7da86457deaea6a87885
Diffstat (limited to 'src/prompt-box.vala')
-rw-r--r--src/prompt-box.vala7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/prompt-box.vala b/src/prompt-box.vala
index 2180c70..273c507 100644
--- a/src/prompt-box.vala
+++ b/src/prompt-box.vala
@@ -385,13 +385,18 @@ public class PromptBox : FadableBox
queue_draw ();
}
- public void set_options_image (Gdk.Pixbuf? image)
+ public void set_options_image (Gdk.Pixbuf? image, string? tooltip)
{
if (option_button == null)
return;
option_image.pixbuf = image;
+ if (tooltip == null)
+ option_image.set_tooltip_text("");
+ else
+ option_image.set_tooltip_text(tooltip);
+
if (image == null)
option_button.hide ();
else