[gnome-text-editor] sourceview: propagate zoom changes to observers



commit 3859f527e65f908936323e10805cf4b75ba54e66
Author: Christian Hergert <chergert redhat com>
Date:   Wed Dec 8 14:22:54 2021 -0800

    sourceview: propagate zoom changes to observers
    
    This fixes an issue where the zoom label in the popover does not update
    when the user changes the zoom level from the page using keybindings.
    
    Fixes #249

 src/editor-source-view.c | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/src/editor-source-view.c b/src/editor-source-view.c
index 87ac627..fabf1f6 100644
--- a/src/editor-source-view.c
+++ b/src/editor-source-view.c
@@ -240,6 +240,9 @@ editor_source_view_zoom (EditorSourceView *self,
     self->font_scale += amount;
 
   editor_source_view_update_css (self);
+
+  g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_FONT_SCALE]);
+  g_object_notify_by_pspec (G_OBJECT (self), properties [PROP_ZOOM_LEVEL]);
 }
 
 static gboolean


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