Skip to content

Commit

Permalink
Scale context popup's height to half the screen
Browse files Browse the repository at this point in the history
  • Loading branch information
nairyo committed May 24, 2023
1 parent 9c86181 commit 3f94bc1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion customcontextmenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,16 @@ function CustomContextMenu:init()

local row_span = VerticalSpan:new{ width = Size.padding.fullscreen }
local frame_width = math.floor(math.min(screen_width, screen_height) * 0.85)
local frame_height = math.floor(math.min(screen_width, screen_height) * 0.50)
local frame_border_size = Size.border.window
local frame_padding = Size.padding.fullscreen
local inner_width = frame_width - 2 * (frame_border_size + frame_padding)
local inner_height = frame_height - 2 * (frame_border_size + frame_padding)

self.scroll_widget = ScrollHtmlWidget:new{
default_font_size = Screen:scaleBySize(self.font_size),
width = inner_width,
height = 150,
height = inner_height,
dialog = self,
}
local button_span_unit_width = Size.span.horizontal_small
Expand Down

0 comments on commit 3f94bc1

Please sign in to comment.