[gnome-builder/wip/gtk4-port: 696/736] libide/editor: use line-height instead of line-spacing




commit e4478c68cb510ddd6e089cb7dd92f822bde44f37
Author: Christian Hergert <chergert redhat com>
Date:   Wed Apr 20 17:27:37 2022 -0700

    libide/editor: use line-height instead of line-spacing
    
    Now that we have GTK 4 we can use line-height CSS instead of pixels above
    or below lines.

 data/gsettings/org.gnome.builder.editor.gschema.xml | 10 +++++-----
 src/libide/editor/ide-editor-page-settings.c        |  3 +++
 2 files changed, 8 insertions(+), 5 deletions(-)
---
diff --git a/data/gsettings/org.gnome.builder.editor.gschema.xml 
b/data/gsettings/org.gnome.builder.editor.gschema.xml
index 945229b35..002cf3933 100644
--- a/data/gsettings/org.gnome.builder.editor.gschema.xml
+++ b/data/gsettings/org.gnome.builder.editor.gschema.xml
@@ -122,11 +122,11 @@
       <summary>Completion Row Count</summary>
       <description>The number of completion rows to display to the user.</description>
     </key>
-    <key name="line-spacing" type="i">
-      <default>0</default>
-      <range min="0" max="32"/>
-      <summary>Line Spacing</summary>
-      <description>The number of pixels to include above and below lines in the editor.</description>
+    <key name="line-height" type="d">
+      <default>1.2</default>
+      <range min="0.5" max="10"/>
+      <summary>Line Height</summary>
+      <description>The line height to use for the selected font.</description>
     </key>
     <key name="interactive-completion" type="b">
       <default>true</default>
diff --git a/src/libide/editor/ide-editor-page-settings.c b/src/libide/editor/ide-editor-page-settings.c
index 2e24dfdd1..5fbbbc49f 100644
--- a/src/libide/editor/ide-editor-page-settings.c
+++ b/src/libide/editor/ide-editor-page-settings.c
@@ -187,6 +187,9 @@ _ide_editor_page_settings_init (IdeEditorPage *self)
   g_settings_bind (editor_settings, "enable-snippets",
                    self->view, "enable-snippets",
                    G_SETTINGS_BIND_GET);
+  g_settings_bind (editor_settings, "line-height",
+                   self->view, "line-height",
+                   G_SETTINGS_BIND_GET);
 
   g_settings_bind_with_mapping (editor_settings, "font-name",
                                 self->view, "font-desc",


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