diff --git a/frontend/document/koptinterface.lua b/frontend/document/koptinterface.lua index bc7bcb87d..3f0353923 100644 --- a/frontend/document/koptinterface.lua +++ b/frontend/document/koptinterface.lua @@ -62,12 +62,12 @@ function KoptInterface:createContext(doc, pageno, bbox) kc:setTrim(doc.configurable.trim_page) kc:setWrap(doc.configurable.text_wrap) kc:setIndent(doc.configurable.detect_indent) - kc:setRotate(doc.configurable.screen_rotation) kc:setColumns(doc.configurable.max_columns) kc:setDeviceDim(screen_size.w, screen_size.h) kc:setDeviceDPI(self.screen_dpi) kc:setStraighten(doc.configurable.auto_straighten) kc:setJustification(doc.configurable.justification) + kc:setWritingDirection(doc.configurable.writing_direction) kc:setZoom(doc.configurable.font_size) kc:setMargin(doc.configurable.page_margin) kc:setQuality(doc.configurable.quality) diff --git a/frontend/ui/data/koptoptions.lua b/frontend/ui/data/koptoptions.lua index c1aa6d1d0..6e42c2ac6 100644 --- a/frontend/ui/data/koptoptions.lua +++ b/frontend/ui/data/koptoptions.lua @@ -72,30 +72,6 @@ local KoptOptions = { values = {1.0, 1.2, 1.4}, default_value = DKOPTREADER_CONFIG_LINE_SPACING, }, - { - name = "max_columns", - name_text = S.COLUMNS, - item_icons = { - "resources/icons/appbar.column.one.png", - "resources/icons/appbar.column.two.png", - "resources/icons/appbar.column.three.png", - }, - values = {1,2,3}, - default_value = DKOPTREADER_CONFIG_MAX_COLUMNS, - }, - { - name = "justification", - name_text = S.TEXT_ALIGN, - item_icons = { - "resources/icons/appbar.align.auto.png", - "resources/icons/appbar.align.left.png", - "resources/icons/appbar.align.center.png", - "resources/icons/appbar.align.right.png", - "resources/icons/appbar.align.justify.png", - }, - values = {-1,0,1,2,3}, - default_value = DKOPTREADER_CONFIG_JUSTIFICATION, - }, } }, { @@ -172,13 +148,6 @@ local KoptOptions = { event = "DocLangUpdate", args = DKOPTREADER_CONFIG_DOC_LANGS_CODE, }, - { - name="screen_rotation", - name_text = S.VERTICAL_TEXT, - toggle = {S.ON, S.OFF}, - values = {90, 0}, - default_value = 0, - }, { name = "word_spacing", name_text = S.WORD_GAP, @@ -187,12 +156,11 @@ local KoptOptions = { default_value = DKOPTREADER_CONFIG_DEFAULT_WORD_SAPCING, }, { - name = "defect_size", - name_text = S.DEFECT_SIZE, - toggle = {S.SMALL, S.MEDIUM, S.LARGE}, - values = {1.0, 3.0, 5.0}, - default_value = DKOPTREADER_CONFIG_DEFECT_SIZE, - event = "DefectSizeUpdate", + name = "writing_direction", + name_text = S.WRITING_DIR, + toggle = {S.LTR, S.RTL, S.TBRTL}, + values = {0, 1, 2}, + default_value = 0, }, { name = "quality", @@ -201,6 +169,39 @@ local KoptOptions = { values={0.5, 1.0, 1.5}, default_value = DKOPTREADER_CONFIG_RENDER_QUALITY, }, + { + name = "max_columns", + name_text = S.COLUMNS, + item_icons = { + "resources/icons/appbar.column.one.png", + "resources/icons/appbar.column.two.png", + "resources/icons/appbar.column.three.png", + }, + values = {1,2,3}, + default_value = DKOPTREADER_CONFIG_MAX_COLUMNS, + }, + { + name = "justification", + name_text = S.TEXT_ALIGN, + item_icons = { + "resources/icons/appbar.align.auto.png", + "resources/icons/appbar.align.left.png", + "resources/icons/appbar.align.center.png", + "resources/icons/appbar.align.right.png", + "resources/icons/appbar.align.justify.png", + }, + values = {-1,0,1,2,3}, + default_value = DKOPTREADER_CONFIG_JUSTIFICATION, + }, + { + name = "defect_size", + name_text = S.DEFECT_SIZE, + toggle = {S.SMALL, S.MEDIUM, S.LARGE}, + values = {1.0, 3.0, 5.0}, + default_value = DKOPTREADER_CONFIG_DEFECT_SIZE, + event = "DefectSizeUpdate", + show = false, + }, { name = "auto_straighten", name_text = S.AUTO_STRAIGHTEN, diff --git a/frontend/ui/data/strings.lua b/frontend/ui/data/strings.lua index eec7dc2ed..163a20362 100644 --- a/frontend/ui/data/strings.lua +++ b/frontend/ui/data/strings.lua @@ -24,6 +24,7 @@ S.FONT_WEIGHT = _("Font weight") S.GAMMA = _("Gamma") S.VIEW_MODE = _("View mode") S.EMBEDDED_STYLE = _("Embedded style") +S.WRITING_DIR = _("Writing Direction") S.ON = _("on") S.OFF = _("off") @@ -50,5 +51,9 @@ S.LANDSCAPE = _("landscape") S.TOGGLE_BOLD = _("toggle bold") S.VIEW_SCROLL = _("scroll") S.VIEW_PAGE = _("page") +S.LTR = _("LTR") +S.RTL = _("RTL") +S.TBRTL = _("TBRTL") +S.TBLTR = _("TBLTR") return S diff --git a/koreader-base b/koreader-base index 949054571..756cd1ed8 160000 --- a/koreader-base +++ b/koreader-base @@ -1 +1 @@ -Subproject commit 949054571038a7467f25f013cd2b5c282dfbc0b8 +Subproject commit 756cd1ed83c598824cfc8678e9cbd488ef0c9c2b