mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
Update UI layout code to use new SVG icons
- Add IconWidget, use it for icons instead of ImageWidget. Specify icons by name only, look for them (with either .svg or .png suffixes) in multiple directories (including koreader/settings/icons/ to allow customizing them). Don't crash when icon name not found, shown a black background warning icon instead. - Don't trust the icons' native sizes: replace scale_for_dpi=true with width/height=DGENERIC_ICON_SIZE, so all icons get the same (tunable) size - except in a few specific use cases. - Top and bottom menu bars: normalize, and have icons properly centered in them, extend vertical line separators up to the edges. - TOC: adjust expand/collapse icons size to items size
This commit is contained in:
@@ -26,22 +26,22 @@ function ReaderMenu:init()
|
||||
},
|
||||
-- items in top menu
|
||||
navi = {
|
||||
icon = "resources/icons/appbar.page.corner.bookmark.png",
|
||||
icon = "appbar.navigation",
|
||||
},
|
||||
typeset = {
|
||||
icon = "resources/icons/appbar.page.text.png",
|
||||
icon = "appbar.typeset",
|
||||
},
|
||||
setting = {
|
||||
icon = "resources/icons/appbar.settings.png",
|
||||
icon = "appbar.settings",
|
||||
},
|
||||
tools = {
|
||||
icon = "resources/icons/appbar.tools.png",
|
||||
icon = "appbar.tools",
|
||||
},
|
||||
search = {
|
||||
icon = "resources/icons/appbar.magnify.browse.png",
|
||||
icon = "appbar.search",
|
||||
},
|
||||
filemanager = {
|
||||
icon = "resources/icons/appbar.cabinet.files.png",
|
||||
icon = "appbar.filebrowser",
|
||||
remember = false,
|
||||
callback = function()
|
||||
self:onTapCloseMenu()
|
||||
@@ -50,7 +50,7 @@ function ReaderMenu:init()
|
||||
end,
|
||||
},
|
||||
main = {
|
||||
icon = "resources/icons/menu-icon.png",
|
||||
icon = "appbar.menu",
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user