From 467e7bf4fc9aa99ed601e655c4a9494c36ce8523 Mon Sep 17 00:00:00 2001 From: chrox Date: Tue, 23 Jul 2013 14:52:15 +0800 Subject: [PATCH] UI tweaks on dictionary window --- frontend/ui/widget/buttontable.lua | 6 ++++-- frontend/ui/widget/dict.lua | 9 ++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/frontend/ui/widget/buttontable.lua b/frontend/ui/widget/buttontable.lua index a24117a95..aa32e4f95 100644 --- a/frontend/ui/widget/buttontable.lua +++ b/frontend/ui/widget/buttontable.lua @@ -13,6 +13,8 @@ ButtonTable = VerticalGroup:new{ padding = scaleByDPI(2), zero_sep = false, + button_font_face = "cfont", + button_font_size = 20, } function ButtonTable:init() @@ -33,8 +35,8 @@ function ButtonTable:init() bordersize = 0, margin = 0, padding = 0, - text_font_face = "cfont", - text_font_size = 18, + text_font_face = self.button_font_face, + text_font_size = self.button_font_size, } local button_dim = button:getSize() local vertical_sep = LineWidget:new{ diff --git a/frontend/ui/widget/dict.lua b/frontend/ui/widget/dict.lua index c2b4ec869..c0cce51a4 100644 --- a/frontend/ui/widget/dict.lua +++ b/frontend/ui/widget/dict.lua @@ -10,9 +10,9 @@ DictQuickLookup = InputContainer:new{ dictionary = nil, definition = nil, dict_index = 1, - title_face = Font:getFace("tfont", 20), - word_face = Font:getFace("tfont", 18), - content_face = Font:getFace("cfont", 18), + title_face = Font:getFace("tfont", 22), + word_face = Font:getFace("tfont", 20), + content_face = Font:getFace("cfont", 20), width = nil, title_padding = scaleByDPI(5), @@ -81,6 +81,8 @@ function DictQuickLookup:update() } local button_table = ButtonTable:new{ width = math.max(self.width, definition:getSize().w), + button_font_face = "cfont", + button_font_size = 20, buttons = { { { @@ -155,6 +157,7 @@ function DictQuickLookup:update() self.dict_frame, } UIManager.repaint_all = true + UIManager.full_refresh = true end function DictQuickLookup:isPrevDictAvaiable()