aboutsummaryrefslogtreecommitdiff
path: root/src/prompt-box.vala
diff options
context:
space:
mode:
authorMihai Moldovan <ionic@ionic.de>2023-03-22 04:08:18 +0100
committerMihai Moldovan <ionic@ionic.de>2023-05-03 23:04:45 +0200
commit036a3b7718f827f2092014c90e883023f125fa7d (patch)
tree284eac25ae909e6c730b16fbcebd5fa0e45ad194 /src/prompt-box.vala
parent8cda2dd8f01537d5132047eed1c8ce6e7db249e3 (diff)
downloadarctica-greeter-036a3b7718f827f2092014c90e883023f125fa7d.tar.gz
arctica-greeter-036a3b7718f827f2092014c90e883023f125fa7d.tar.bz2
arctica-greeter-036a3b7718f827f2092014c90e883023f125fa7d.zip
src/prompt-box.vala: enable line wrapping for (error) messages.
Long lines were previously truncated as part of the fading label. Since PAM (error) messages are shown within the prompt box, truncating them is a really bad idea, since the user might not understand what went wrong and how it can be fixed. Enabling line wrapping makes sure that the full message is always shown - at least theoretically. Messages may still be truncated if they are long enough to overflow the prompt box itself, but this is caused by the prompt box not resizing itself correctly. Further work on that is necessary.
Diffstat (limited to 'src/prompt-box.vala')
-rw-r--r--src/prompt-box.vala1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/prompt-box.vala b/src/prompt-box.vala
index ffce61c..6953c1b 100644
--- a/src/prompt-box.vala
+++ b/src/prompt-box.vala
@@ -555,6 +555,7 @@ public class PromptBox : FadableBox
public void add_message (string text, bool is_error)
{
var label = new FadingLabel (text);
+ label.set_line_wrap (true);
var style_ctx = label.get_style_context();