Skip to content

Commit 6e4e770

Browse files
committed
adjust the layout of the preferences to take less vertical space
1 parent cb920d9 commit 6e4e770

File tree

1 file changed

+28
-19
lines changed

1 file changed

+28
-19
lines changed

gui-lib/framework/private/preferences.rkt

+28-19
Original file line numberDiff line numberDiff line change
@@ -462,42 +462,54 @@ the state transitions / contracts are:
462462
(list (string-constant editor-prefs-panel-label)
463463
(string-constant editor-general-prefs-panel-label))
464464
(λ (editor-panel)
465-
(add-check editor-panel 'framework:delete-forward?
465+
(define narrow-checkboxes-hp (new horizontal-panel% [parent editor-panel] [stretchable-height #f]))
466+
(define narrow-checkboxes-left
467+
(new vertical-panel% [parent narrow-checkboxes-hp] [stretchable-height #f] [alignment '(left top)]))
468+
(define narrow-checkboxes-right
469+
(new vertical-panel% [parent narrow-checkboxes-hp] [stretchable-height #f] [alignment '(left top)]))
470+
;; start narrow ones; the left should have more than the right on all platforms
471+
;; macos, left: 5, right: 4
472+
;; linux, left: 4, right: 3
473+
;; win, left: 5, right: 3
474+
(add-check narrow-checkboxes-left 'framework:delete-forward?
466475
(string-constant map-delete-to-backspace)
467476
not not)
468-
(add-check editor-panel
477+
(add-check narrow-checkboxes-left
469478
'framework:auto-set-wrap?
470479
(string-constant wrap-words-in-editor-buffers))
471-
472-
(add-check editor-panel
473-
'framework:menu-bindings
474-
(string-constant enable-keybindings-in-menus))
480+
(add-check narrow-checkboxes-left
481+
'framework:caret-blink-disable?
482+
(string-constant disable-caret-blinking))
475483
(when (memq (system-type) '(macosx))
476-
(add-check editor-panel
484+
(add-check narrow-checkboxes-left
477485
'framework:alt-as-meta
478486
(string-constant alt-as-meta))
479-
(add-check editor-panel
487+
(add-check narrow-checkboxes-left
480488
'framework:special-meta-key
481489
(string-constant command-as-meta)))
482-
483490
(when (memq (system-type) '(windows))
484-
(add-check editor-panel
491+
(add-check narrow-checkboxes-left
485492
'framework:any-control+alt-is-altgr
486493
(string-constant any-control+alt-is-altgr)))
487-
488-
(add-check editor-panel
494+
(add-check (if (equal? (system-type) 'macosx)
495+
narrow-checkboxes-right
496+
narrow-checkboxes-left)
489497
'framework:coloring-active
490498
(string-constant online-coloring-active))
491-
492-
(add-check editor-panel
499+
(add-check narrow-checkboxes-right
493500
'framework:anchored-search
494501
(string-constant find-anchor-based))
495-
(add-check editor-panel
502+
(add-check narrow-checkboxes-right
496503
'framework:do-paste-normalization
497504
(string-constant normalize-string-preference))
498-
(add-check editor-panel
505+
(add-check narrow-checkboxes-right
499506
'framework:overwrite-mode-keybindings
500507
(string-constant enable-overwrite-mode-keybindings))
508+
;; end narrow ones
509+
510+
(add-check editor-panel
511+
'framework:menu-bindings
512+
(string-constant enable-keybindings-in-menus))
501513
(add-check editor-panel
502514
'framework:automatic-parens
503515
(string-constant enable-automatic-parens))
@@ -513,9 +525,6 @@ the state transitions / contracts are:
513525
'framework:column-guide-width
514526
(string-constant maximum-char-width-guide-pref-check-box)
515527
(λ (n) (and (exact-integer? n) (>= n 2))))
516-
(add-check editor-panel
517-
'framework:caret-blink-disable?
518-
(string-constant disable-caret-blinking))
519528
(when (equal? (system-type) 'unix)
520529
(add-check editor-panel
521530
'framework:editor-x-selection-mode

0 commit comments

Comments
 (0)