Skip to content

Commit

Permalink
Same indent width range everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeremy Wootten committed Jul 10, 2023
1 parent c42bf2c commit 33eb40d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions data/io.elementary.code.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
<description>Whether Code should use auto indentation</description>
</key>
<key name="indent-width" type="i">
<range min="2" max="16"/>
<default>4</default>
<summary>Tab Size</summary>
<description>Specifies the number of spaces that should be displayed instead of Tab characters.</description>
Expand Down
4 changes: 2 additions & 2 deletions src/Widgets/FormatBar.vala
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
);
}
});
Expand Down

0 comments on commit 33eb40d

Please sign in to comment.