From 3e94520e537c8a818df42af89257d5f2d091c3dd Mon Sep 17 00:00:00 2001 From: chrox Date: Sun, 13 Oct 2013 23:10:31 +0800 Subject: [PATCH] add width param in ToggleSwitch --- frontend/ui/data/koptoptions.lua | 1 + frontend/ui/widget/config.lua | 1 + 2 files changed, 2 insertions(+) diff --git a/frontend/ui/data/koptoptions.lua b/frontend/ui/data/koptoptions.lua index 3339ae4a6..dd4f0a775 100644 --- a/frontend/ui/data/koptoptions.lua +++ b/frontend/ui/data/koptoptions.lua @@ -24,6 +24,7 @@ KoptOptions = { { name = "trim_page", name_text = PAGE_CROP_STR, + width = 225, toggle = {MANUAL_STR, AUTO_STR, SEMIAUTO_STR}, alternate = false, values = {0, 1, 2}, diff --git a/frontend/ui/widget/config.lua b/frontend/ui/widget/config.lua index 2bcb3bf97..001439a7e 100644 --- a/frontend/ui/widget/config.lua +++ b/frontend/ui/widget/config.lua @@ -323,6 +323,7 @@ function ConfigOption:init() if self.options[c].toggle then local switch = ToggleSwitch:new{ + width = scaleByDPI(self.options[c].width or 216), name = self.options[c].name, toggle = self.options[c].toggle, alternate = self.options[c].alternate,