From ec4232f6d844037274f9f4b1eacad37d023577b2 Mon Sep 17 00:00:00 2001 From: Tae Won Ha Date: Sat, 7 Apr 2018 12:05:58 +0200 Subject: [PATCH] GH-543 Add info field --- VimR/VimR/KeysPref.swift | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/VimR/VimR/KeysPref.swift b/VimR/VimR/KeysPref.swift index 6ec5a18e..950b3d62 100644 --- a/VimR/VimR/KeysPref.swift +++ b/VimR/VimR/KeysPref.swift @@ -82,10 +82,17 @@ class KeysPref: PrefPane, UiComponent, NSTextFieldDelegate { title: "Use Right Option as Meta", action: #selector(KeysPref.isRightOptionMetaAction(_:))) + let metaInfo = self.infoTextField(markdown: """ + When an Option key is set to Meta, then every input containing the corresponding Option key will be passed + through to Neovim. This means that you can use mappings like `` in Neovim, but cannot use the corresponding + Option key to enter special characters like `ยต` which is entered by `Option-M`. + """) + self.addSubview(paneTitle) self.addSubview(isLeftOptionMeta) self.addSubview(isRightOptionMeta) + self.addSubview(metaInfo) paneTitle.autoPinEdge(toSuperviewEdge: .top, withInset: 18) paneTitle.autoPinEdge(toSuperviewEdge: .left, withInset: 18) @@ -96,6 +103,10 @@ class KeysPref: PrefPane, UiComponent, NSTextFieldDelegate { isRightOptionMeta.autoPinEdge(.top, to: .bottom, of: isLeftOptionMeta, withOffset: 5) isRightOptionMeta.autoPinEdge(toSuperviewEdge: .left, withInset: 18) + + metaInfo.autoPinEdge(.top, to: .bottom, of: isRightOptionMeta, withOffset: 5) + metaInfo.autoPinEdge(toSuperviewEdge: .left, withInset: 18) + metaInfo.autoSetDimension(.width, toSize: 300) } }