feat: epub bookmarks (#1337)
Co-authored-by: vedi0boy <nate@origin8publishing.com> Co-authored-by: Uri Tauber <uritaube@gmail.com>
This commit is contained in:
co-authored by
vedi0boy
Uri Tauber
parent
bbb3e06eb1
commit
36a3a0cc3a
@@ -14,6 +14,7 @@
|
||||
#include "components/UITheme.h"
|
||||
#include "components/icons/book.h"
|
||||
#include "components/icons/book24.h"
|
||||
#include "components/icons/bookmark.h"
|
||||
#include "components/icons/cover.h"
|
||||
#include "components/icons/file24.h"
|
||||
#include "components/icons/folder.h"
|
||||
@@ -73,6 +74,8 @@ const uint8_t* iconForName(UIIcon icon, int size) {
|
||||
return WifiIcon;
|
||||
case UIIcon::Hotspot:
|
||||
return HotspotIcon;
|
||||
case UIIcon::Bookmark:
|
||||
return BookmarkIcon;
|
||||
default:
|
||||
return nullptr;
|
||||
}
|
||||
@@ -202,6 +205,11 @@ void LyraTheme::drawTabBar(const GfxRenderer& renderer, Rect rect, const std::ve
|
||||
renderer.drawLine(rect.x, rect.y + rect.height - 1, rect.x + rect.width - 1, rect.y + rect.height - 1, true);
|
||||
}
|
||||
|
||||
int LyraTheme::getListPageItems(int contentHeight, bool hasSubtitle) const {
|
||||
int rowHeight = (hasSubtitle) ? LyraMetrics::values.listWithSubtitleRowHeight : LyraMetrics::values.listRowHeight;
|
||||
return contentHeight / rowHeight;
|
||||
}
|
||||
|
||||
void LyraTheme::drawList(const GfxRenderer& renderer, Rect rect, int itemCount, int selectedIndex,
|
||||
const std::function<std::string(int index)>& rowTitle,
|
||||
const std::function<std::string(int index)>& rowSubtitle,
|
||||
|
||||
Reference in New Issue
Block a user