From 33eb40d7576e51fa7cf6a0b333c337581fd0a699 Mon Sep 17 00:00:00 2001 From: Jeremy Wootten Date: Mon, 10 Jul 2023 18:49:25 +0100 Subject: [PATCH] Same indent width range everywhere --- data/io.elementary.code.gschema.xml | 1 + src/Widgets/FormatBar.vala | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/io.elementary.code.gschema.xml b/data/io.elementary.code.gschema.xml index 1794882fa..d0bad47f8 100644 --- a/data/io.elementary.code.gschema.xml +++ b/data/io.elementary.code.gschema.xml @@ -121,6 +121,7 @@ Whether Code should use auto indentation + 4 Tab Size Specifies the number of spaces that should be displayed instead of Tab characters. diff --git a/src/Widgets/FormatBar.vala b/src/Widgets/FormatBar.vala index 33ed28aa4..53d4673ee 100644 --- a/src/Widgets/FormatBar.vala +++ b/src/Widgets/FormatBar.vala @@ -158,7 +158,7 @@ public class Code.FormatBar : Gtk.Box { hexpand = true }; - width_spinbutton = new Gtk.SpinButton.with_range (1, 24, 1); + width_spinbutton = new Gtk.SpinButton.with_range (2, 16, 1); tab_box = new Gtk.Box (Gtk.Orientation.HORIZONTAL, 12) { margin_top = 6, @@ -193,7 +193,7 @@ public class Code.FormatBar : Gtk.Box { if (!tab_width_set_by_editor_config) { Scratch.settings.set_int ( "indent-width", - ((int)width_spinbutton.@value).clamp (2, 16) + (int)width_spinbutton.@value ); } });