From 99d0ee9159085b5e62597c975e199a6476cbfa82 Mon Sep 17 00:00:00 2001 From: achesak Date: Fri, 28 Oct 2016 14:49:50 -0400 Subject: [PATCH] Shortcuts use scrolled window. --- settings.nim | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/settings.nim b/settings.nim index 2b5205d..a659616 100644 --- a/settings.nim +++ b/settings.nim @@ -545,23 +545,21 @@ proc initShortcuts(settingsTabs: PNotebook) = var VBox = vboxNew(false, 5) discard settingsTabs.appendPage(VBox, labelNew("Shortcuts")) VBox.show() - - var HBox = hboxNew(false, 30) - VBox.packStart(HBox, false, false, 5) - HBox.show() - var hint = labelNew("Use the Delete button to clear a shortcut. Changes will be active after restart") + var hint = labelNew("Use the Delete button to clear a shortcut. Changes will be active after restart.") hint.setAlignment(0, 0.5) hint.show() - var Box2 = hboxNew(false, 0) - VBox.packStart(Box2, false, false, 0) - Box2.show() - Box2.packStart(hint, false, false, 10) - + VBox.packStart(hint, false, false, 5) + + var scrolledWindow = scrolledwindowNew(nil, nil) + scrolledWindow.setPolicy(POLICY_AUTOMATIC, POLICY_AUTOMATIC) + VBox.packStart(scrolledWindow, true, true, 5) + scrolledWindow.show() + VBox = vboxNew(false, 5) - HBox.packStart(VBox, false, false, 5) VBox.show() - + scrolledWindow.addWithViewport(VBox) + keyCommentLinesEdit = addKeyEdit(VBox, "Comment lines", win.globalSettings.keyCommentLines) keyDeleteLineEdit = addKeyEdit(VBox, "Delete line", win.globalSettings.keyDeleteLine) keyDuplicateLinesEdit = addKeyEdit(VBox, "Duplicate lines", win.globalSettings.keyDuplicateLines) @@ -578,11 +576,6 @@ proc initShortcuts(settingsTabs: PNotebook) = keyReplaceEdit = addKeyEdit(VBox, "Find and replace", win.globalSettings.keyReplace) keyFindNextEdit = addKeyEdit(VBox, "Find next", win.globalSettings.keyFindNext) keyFindPreviousEdit = addKeyEdit(VBox, "Find previous", win.globalSettings.keyFindPrevious) - - VBox = vboxNew(false, 5) - HBox.packStart(VBox, false, false, 5) - VBox.show() - keyGoToLineEdit = addKeyEdit(VBox, "Go to line", win.globalSettings.keyGoToLine) keyGoToDefEdit = addKeyEdit(VBox, "Go to definition under cursor", win.globalSettings.keyGoToDef) keyQuitEdit = addKeyEdit(VBox, "Quit", win.globalSettings.keyQuit)