Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[UX] Keyboard character selection popup #4886

merged 13 commits into from Apr 9, 2019

fix padding business

  • Loading branch information...
Frenzie committed Apr 9, 2019
commit 29c7c69fc63ec153b4c7e33c5fc43c968212fb99
@@ -119,7 +119,9 @@ function VirtualKey:init()
bottom_key_chars[2] = key_chars.south
bottom_key_chars[3] = key_chars.southeast

local blank = VerticalSpan:new{width = self.width}
local blank = HorizontalSpan:new{width = self.width}
local h_key_padding = HorizontalSpan:new{width = self.keyboard.key_padding}
local v_key_padding = VerticalSpan:new{width = self.keyboard.key_padding}

local vertical_group = VerticalGroup:new{}
local horizontal_group_extra = HorizontalGroup:new{}
@@ -147,13 +149,19 @@ function VirtualKey:init()
table.insert(group, blank)
if i ~= #chars then
table.insert(group, h_key_padding)
table.insert(vertical_group, group)
table.insert(popup_focus_manager.layout, layout_horizontal)

This comment has been minimized.

Copy link

Frenzie Apr 9, 2019

Author Member

It works well with the keyboard, go me! ;-) (Okay, just for thinking of it.)

horizontalRow(extra_key_chars, horizontal_group_extra)
table.insert(vertical_group, v_key_padding)
horizontalRow(top_key_chars, horizontal_group_top)
table.insert(vertical_group, v_key_padding)
horizontalRow(middle_key_chars, horizontal_group_middle)
table.insert(vertical_group, v_key_padding)
horizontalRow(bottom_key_chars, horizontal_group_bottom)

local keyboard_frame = FrameContainer:new{
@@ -164,8 +172,8 @@ function VirtualKey:init()
padding = self.keyboard.padding,
dimen = Geom:new{
w = self.width*3 - 2*Size.border.default - 2*self.keyboard.padding,
h = self.height*4 - 2*Size.border.default - 2*self.keyboard.padding,
w = self.width*3 - 2*Size.border.default + 4*self.keyboard.key_padding,
h = self.height*4 - 2*Size.border.default + 5*self.keyboard.key_padding,
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.