Rotation icons: make 'em dynamic. (#7440)

Followup to #7306.

As discussed there, the only way to make everybody happy is to make 'em context-aware. At which point, trying to make the fact that it's a *device* rotation and not a *content* one come across in the icon design loses its interest, and would actually only further muddy the issue.

So, these are similar is spirit to the traditional rotation icons in pretty much anything that can rotate text content, with a special inspiration from the Kindle 4 & PocketBook UI.

Fix #7429
This commit is contained in:
NiLuJe
2021-03-29 05:12:22 +02:00
committed by GitHub
parent f3341d9dc0
commit e33476996a
11 changed files with 771 additions and 21 deletions

View File

@@ -29,12 +29,41 @@ local KoptOptions = {
{
name = "rotation_mode",
name_text = _("Rotation"),
item_icons = {
"rotation.90CCW",
"rotation.0UR",
"rotation.90CW",
"rotation.180UD",
},
item_icons_func = function()
if Screen:getRotationMode() == Screen.ORIENTATION_PORTRAIT then
-- P, 0UR
return {
"rotation.P.90CCW",
"rotation.P.0UR",
"rotation.P.90CW",
"rotation.P.180UD",
}
elseif Screen:getRotationMode() == Screen.ORIENTATION_PORTRAIT_ROTATED then
-- P, 180UD
return {
"rotation.P.90CW",
"rotation.P.180UD",
"rotation.P.90CCW",
"rotation.P.0UR",
}
elseif Screen:getRotationMode() == Screen.ORIENTATION_LANDSCAPE then
-- L, 90CW
return {
"rotation.L.90CCW",
"rotation.L.0UR",
"rotation.L.90CW",
"rotation.L.180UD",
}
else
-- L, 90CCW
return {
"rotation.L.90CW",
"rotation.L.180UD",
"rotation.L.90CCW",
"rotation.L.0UR",
}
end
end,
-- For Dispatcher's sake
labels = {C_("Rotation", "⤹ 90°"), C_("Rotation", "↑ 0°"), C_("Rotation", "⤸ 90°"), C_("Rotation", "↓ 180°")},
alternate = false,