diff options
Diffstat (limited to 'src/prompt-box.vala')
-rw-r--r-- | src/prompt-box.vala | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/prompt-box.vala b/src/prompt-box.vala index ffce61c..e1dc629 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(); @@ -572,10 +573,21 @@ public class PromptBox : FadableBox } Gdk.RGBA color = { 1.0f, 1.0f, 1.0f, 1.0f }; - if (is_error) - color.parse ("#df382c"); + if (is_error) { + color.parse ("#820900"); + + /* + * Overriding the background color will look ugly, but at least + * always make the text readable, which is probably important for + * error messages. + * We probably want to find a better way of handling this. + */ + Gdk.RGBA bg_color = { 1.0f, 1.0f, 1.0f, 1.0f }; + label.override_background_color (Gtk.StateFlags.NORMAL, bg_color); + } label.override_color (Gtk.StateFlags.NORMAL, color); + label.xalign = 0.0f; label.set_data<bool> ("prompt-box-is-error", is_error); |