[gnome-builder/wip/gtk4-port] libide/editor: use line-height instead of line-spacing
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port] libide/editor: use line-height instead of line-spacing
- Date: Thu, 21 Apr 2022 00:47:05 +0000 (UTC)
commit 2d95587128be978ede7e3af431e725b7d6bf8566
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]