diff --git a/frontend/ui/widget/touchmenu.lua b/frontend/ui/widget/touchmenu.lua index df3103213..42bd65d55 100644 --- a/frontend/ui/widget/touchmenu.lua +++ b/frontend/ui/widget/touchmenu.lua @@ -14,13 +14,13 @@ local GestureRange = require("ui/gesturerange") local Button = require("ui/widget/button") local UIManager = require("ui/uimanager") local Device = require("device") -local Screen = require("device").screen +local Screen = Device.screen local Geom = require("ui/geometry") local Font = require("ui/font") -local util = require("ffi/util") -local _ = require("gettext") local Blitbuffer = require("ffi/blitbuffer") local getMenuText = require("util").getMenuText +local util = require("ffi/util") +local _ = require("gettext") --[[ TouchMenuItem widget diff --git a/kodev b/kodev index 329d9590d..ea37dc937 100755 --- a/kodev +++ b/kodev @@ -272,10 +272,12 @@ usage: run OPTIONS: - -h=X, --screen-height=X set height of the emulator screen (default: 720) - -w=X, --screen-width=X set width of the emulator screen (default: 540) - --no-build run reader without rebuilding - --disable-touch use this if you want to simulate keyboard only devices + -h=X, --screen-height=X set height of the emulator screen (default: 720) + -w=X, --screen-width=X set width of the emulator screen (default: 540) + --no-build run reader without rebuilding + --disable-touch use this if you want to simulate keyboard only devices + -s=FOO --simulate=FOO simulate dimension and other specs for a given device model + supported model: kobo-aura-one, kindle3 " screen_width=540 screen_height=720 @@ -295,6 +297,22 @@ OPTIONS: -h | --screen-height) screen_height=${VALUE} ;; + -s | --simulate) + device_model=${VALUE} + case ${device_model} in + kindle3) + screen_width=600 + screen_height=800 + ;; + kobo-aura-one) + screen_width=1404 + screen_height=1872 + ;; + *) + echo "ERROR: spec unknown for ${device_model}." + ;; + esac + ;; -h | --help) echo "${RUN_HELP_MSG}" exit 0