mirror of
https://github.com/koreader/koreader.git
synced 2025-12-13 20:36:53 +01: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:
@@ -91,7 +91,7 @@ function BookStatusWidget:init()
|
||||
end
|
||||
|
||||
self.star = Button:new{
|
||||
icon = "resources/icons/stats.star.empty.png",
|
||||
icon = "star.empty",
|
||||
bordersize = 0,
|
||||
radius = 0,
|
||||
margin = 0,
|
||||
@@ -256,7 +256,7 @@ function BookStatusWidget:setStar(num)
|
||||
|
||||
for i = 1, num do
|
||||
table.insert(stars_group, self.star:new{
|
||||
icon = "resources/icons/stats.star.full.png",
|
||||
icon = "star.full",
|
||||
callback = function() self:setStar(i) end
|
||||
})
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user