move CreOptions to credocument.lua

pull/2/merge
Qingping Hou 12 years ago
parent ad1112468f
commit 5ce4f24c37

@ -1,5 +1,66 @@
require "ui/geometry"
require "ui/creoptions"
CreOptions = {
prefix = 'copt',
default_options = {
},
{
icon = "resources/icons/appbar.column.two.large.png",
options = {
{
name = "line_spacing",
name_text = "Line Spacing",
item_text = {"decrease", "increase"},
args = {"decrease", "increase"},
default_arg = nil,
event = "ChangeLineSpace",
},
}
},
{
icon = "resources/icons/appbar.text.size.large.png",
options = {
{
name = "font_size",
item_text = {"Aa", "Aa", "Aa", "Aa", "Aa", "Aa", "Aa", "Aa"},
item_align_center = 1.0,
spacing = Screen:getWidth()*0.03,
item_font_size = {18, 20, 22, 24, 29, 33, 39, 44},
values = {18, 20, 22, 24, 29, 33, 39, 44},
default_value = 1,
event = "SetFontSize",
},
}
},
{
icon = "resources/icons/appbar.grade.b.large.png",
options = {
{
name = "font_weight",
name_text = "Font weight",
item_text = {"toggle bolder"},
-- args is indeed not used, we put here just to keep the
-- UI happy.
args = {1},
default_arg = nil,
event = "ToggleFontBolder",
}
}
},
{
icon = "resources/icons/appbar.settings.large.png",
options = {
{
name = "view_mode",
name_text = "View mode",
item_text = {"scroll", "page"},
args = {"scroll", "page"},
default_arg = "page",
event = "SetViewMode",
},
}
},
}
CreDocument = Document:new{
-- this is defined in kpvcrlib/crengine/crengine/include/lvdocview.h

@ -1,62 +0,0 @@
CreOptions = {
prefix = 'copt',
default_options = {
},
{
icon = "resources/icons/appbar.column.two.large.png",
options = {
{
name = "line_spacing",
name_text = "Line Spacing",
item_text = {"decrease", "increase"},
args = {"decrease", "increase"},
default_arg = nil,
event = "ChangeLineSpace",
},
}
},
{
icon = "resources/icons/appbar.text.size.large.png",
options = {
{
name = "font_size",
item_text = {"Aa", "Aa", "Aa", "Aa", "Aa", "Aa", "Aa", "Aa"},
item_align_center = 1.0,
spacing = Screen:getWidth()*0.03,
item_font_size = {18, 20, 22, 24, 29, 33, 39, 44},
values = {18, 20, 22, 24, 29, 33, 39, 44},
default_value = 1,
event = "SetFontSize",
},
}
},
{
icon = "resources/icons/appbar.grade.b.large.png",
options = {
{
name = "font_weight",
name_text = "Font weight",
item_text = {"toggle bolder"},
-- args is indeed not used, we put here just to keep the
-- UI happy.
args = {1},
default_arg = nil,
event = "ToggleFontBolder",
}
}
},
{
icon = "resources/icons/appbar.settings.large.png",
options = {
{
name = "view_mode",
name_text = "View mode",
item_text = {"scroll", "page"},
args = {"scroll", "page"},
default_arg = "page",
event = "SetViewMode",
},
}
},
}
Loading…
Cancel
Save