Highlights: quicker Style and Note marker dialogs (#13223)
Some checks are pending
macos / macOS 13 x86-64 🔨15.2 🎯10.15 (push) Waiting to run
macos / macOS 14 ARM64 🔨15.4 🎯11.0 (push) Waiting to run

This commit is contained in:
hius07
2025-02-12 09:14:03 +02:00
committed by GitHub
parent c65e7971ec
commit 70fcc90a3c
6 changed files with 87 additions and 100 deletions

View File

@@ -66,10 +66,19 @@ local Button = InputContainer:extend{
text_font_face = "cfont",
text_font_size = 20,
text_font_bold = true,
menu_style = nil, -- see init()
vsync = nil, -- when "flash_ui" is enabled, allow bundling the highlight with the callback, and fence that batch away from the unhighlight. Avoid delays when callback requires a "partial" on Kobo Mk. 7, c.f., ffi/framebuffer_mxcfb for more details.
}
function Button:init()
if self.menu_style then
self.align = "left"
self.padding_h = Size.padding.large
self.text_font_face = "smallinfofont"
self.text_font_size = 22
self.text_font_bold = false
end
-- Prefer an optional text_func over text
if self.text_func and type(self.text_func) == "function" then
self.text = self.text_func()