[gitg/commit-margin: 2/2] highlight characters outside margins




commit 6a6ca91592f291861196edd7bdbfb325e1b33471
Author: Alberto Fanjul <albertofanjul gmail com>
Date:   Sun Jun 12 23:44:40 2022 +0200

    highlight characters outside margins

 gitg/commit/gitg-commit-dialog.vala | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)
---
diff --git a/gitg/commit/gitg-commit-dialog.vala b/gitg/commit/gitg-commit-dialog.vala
index 99f795cf..4e368168 100644
--- a/gitg/commit/gitg-commit-dialog.vala
+++ b/gitg/commit/gitg-commit-dialog.vala
@@ -742,17 +742,6 @@ class Dialog : Gtk.Dialog
                d_scrolled_window_stats.set_min_content_height(allocation.y + allocation.height);
        }
 
-       private void update_too_long_tag()
-       {
-               // Get the warning fg/bg colors
-               var ctx = d_source_view_message.get_style_context();
-
-               ctx.save();
-               ctx.add_class("warning");
-
-               ctx.restore();
-       }
-
        private bool on_commit_message_key_press_event(Gtk.Widget widget, Gdk.EventKey event)
        {
                var mmask = Gtk.accelerator_get_default_mod_mask();
@@ -786,13 +775,8 @@ class Dialog : Gtk.Dialog
                d_subject_tag = b.create_tag("subject",
                                             "weight", Pango.Weight.BOLD);
 
-               d_too_long_tag = b.create_tag("too-long");
-
-               update_too_long_tag();
+               d_too_long_tag = b.create_tag("too-long", "background", "#f57900");
 
-               d_source_view_message.style_updated.connect(() => {
-                       update_too_long_tag();
-               });
 
                b.changed.connect(() => {
                        do_highlight();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]