diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-17 21:54:36 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-17 21:54:36 +0200 |
commit | 13c8ad97c6cbef98caee574dd55103db5021653c (patch) | |
tree | fcdef223b955a906560286abed2b577751d23b31 /src | |
parent | 59462f7c4f35c75b2951827a81a5cc0ca4d7dbec (diff) |
Moved "Find on page" menu item
Mobile "Find on page" is now in the nav menu. Added icons to sidebar toggle items.
Diffstat (limited to 'src')
-rw-r--r-- | src/ui/documentwidget.c | 5 | ||||
-rw-r--r-- | src/ui/text.c | 1 | ||||
-rw-r--r-- | src/ui/window.c | 12 |
3 files changed, 7 insertions, 11 deletions
diff --git a/src/ui/documentwidget.c b/src/ui/documentwidget.c index 592470eb..83f270bd 100644 --- a/src/ui/documentwidget.c +++ b/src/ui/documentwidget.c | |||
@@ -2549,11 +2549,6 @@ static iBool processEvent_DocumentWidget_(iDocumentWidget *d, const SDL_Event *e | |||
2549 | { "---", 0, 0, NULL }, | 2549 | { "---", 0, 0, NULL }, |
2550 | { "Copy Page URL", 0, 0, "document.copylink" } }, | 2550 | { "Copy Page URL", 0, 0, "document.copylink" } }, |
2551 | 12); | 2551 | 12); |
2552 | if (deviceType_App() != desktop_AppDeviceType) { | ||
2553 | /* TODO: Perhaps not the best place for this? */ | ||
2554 | insert_Array(&items, size_Array(&items) - 3, | ||
2555 | &(iMenuItem){ magnifyingGlass_Icon " Find on page", 0, 0, "focus.set id:find.input" }); | ||
2556 | } | ||
2557 | if (isEmpty_Range(&d->selectMark)) { | 2552 | if (isEmpty_Range(&d->selectMark)) { |
2558 | pushBackN_Array( | 2553 | pushBackN_Array( |
2559 | &items, | 2554 | &items, |
diff --git a/src/ui/text.c b/src/ui/text.c index 5163d14a..8107b886 100644 --- a/src/ui/text.c +++ b/src/ui/text.c | |||
@@ -994,7 +994,6 @@ static iRect run_Font_(iFont *d, const iRunArgs *args) { | |||
994 | const iColor clr = get_Color(colorNum); | 994 | const iColor clr = get_Color(colorNum); |
995 | SDL_SetTextureColorMod(text_.cache, clr.r, clr.g, clr.b); | 995 | SDL_SetTextureColorMod(text_.cache, clr.r, clr.g, clr.b); |
996 | if (args->mode & fillBackground_RunMode) { | 996 | if (args->mode & fillBackground_RunMode) { |
997 | printf("draw color: [%d] %d,%d,%d\n", colorNum, clr.r, clr.g, clr.b); | ||
998 | SDL_SetRenderDrawColor(text_.render, clr.r, clr.g, clr.b, 0); | 997 | SDL_SetRenderDrawColor(text_.render, clr.r, clr.g, clr.b, 0); |
999 | } | 998 | } |
1000 | } | 999 | } |
diff --git a/src/ui/window.c b/src/ui/window.c index 5d5b8e0c..1c0c0394 100644 --- a/src/ui/window.c +++ b/src/ui/window.c | |||
@@ -194,8 +194,8 @@ static const iMenuItem navMenuItems_[] = { | |||
194 | { download_Icon " Save to Downloads", SDLK_s, KMOD_PRIMARY, "document.save" }, | 194 | { download_Icon " Save to Downloads", SDLK_s, KMOD_PRIMARY, "document.save" }, |
195 | { "Copy Source Text", SDLK_c, KMOD_PRIMARY, "copy" }, | 195 | { "Copy Source Text", SDLK_c, KMOD_PRIMARY, "copy" }, |
196 | { "---", 0, 0, NULL }, | 196 | { "---", 0, 0, NULL }, |
197 | { "Toggle Left Sidebar", SDLK_l, KMOD_PRIMARY | KMOD_SHIFT, "sidebar.toggle" }, | 197 | { leftHalf_Icon " Toggle Left Sidebar", SDLK_l, KMOD_PRIMARY | KMOD_SHIFT, "sidebar.toggle" }, |
198 | { "Toggle Right Sidebar", SDLK_p, KMOD_PRIMARY | KMOD_SHIFT, "sidebar2.toggle" }, | 198 | { rightHalf_Icon " Toggle Right Sidebar", SDLK_p, KMOD_PRIMARY | KMOD_SHIFT, "sidebar2.toggle" }, |
199 | { "Zoom In", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" }, | 199 | { "Zoom In", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" }, |
200 | { "Zoom Out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, | 200 | { "Zoom Out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, |
201 | { "Reset Zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, | 201 | { "Reset Zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, |
@@ -218,8 +218,9 @@ static const iMenuItem tabletNavMenuItems_[] = { | |||
218 | { add_Icon " New Tab", 't', KMOD_PRIMARY, "tabs.new" }, | 218 | { add_Icon " New Tab", 't', KMOD_PRIMARY, "tabs.new" }, |
219 | { close_Icon " Close Tab", 'w', KMOD_PRIMARY, "tabs.close" }, | 219 | { close_Icon " Close Tab", 'w', KMOD_PRIMARY, "tabs.close" }, |
220 | { "---", 0, 0, NULL }, | 220 | { "---", 0, 0, NULL }, |
221 | { "Toggle Left Sidebar", SDLK_l, KMOD_PRIMARY | KMOD_SHIFT, "sidebar.toggle" }, | 221 | { magnifyingGlass_Icon " Find on page", 0, 0, "focus.set id:find.input" }, |
222 | { "Toggle Right Sidebar", SDLK_p, KMOD_PRIMARY | KMOD_SHIFT, "sidebar2.toggle" }, | 222 | { leftHalf_Icon " Toggle Left Sidebar", SDLK_l, KMOD_PRIMARY | KMOD_SHIFT, "sidebar.toggle" }, |
223 | { rightHalf_Icon " Toggle Right Sidebar", SDLK_p, KMOD_PRIMARY | KMOD_SHIFT, "sidebar2.toggle" }, | ||
223 | { "Zoom In", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" }, | 224 | { "Zoom In", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" }, |
224 | { "Zoom Out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, | 225 | { "Zoom Out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, |
225 | { "Reset Zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, | 226 | { "Reset Zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, |
@@ -238,7 +239,8 @@ static const iMenuItem phoneNavMenuItems_[] = { | |||
238 | { add_Icon " New Tab", 't', KMOD_PRIMARY, "tabs.new" }, | 239 | { add_Icon " New Tab", 't', KMOD_PRIMARY, "tabs.new" }, |
239 | { close_Icon " Close Tab", 'w', KMOD_PRIMARY, "tabs.close" }, | 240 | { close_Icon " Close Tab", 'w', KMOD_PRIMARY, "tabs.close" }, |
240 | { "---", 0, 0, NULL }, | 241 | { "---", 0, 0, NULL }, |
241 | { "Toggle Sidebar", SDLK_l, KMOD_PRIMARY | KMOD_SHIFT, "sidebar.toggle" }, | 242 | { magnifyingGlass_Icon " Find on page", 0, 0, "focus.set id:find.input" }, |
243 | { leftHalf_Icon " Toggle Sidebar", SDLK_l, KMOD_PRIMARY | KMOD_SHIFT, "sidebar.toggle" }, | ||
242 | { "Zoom In", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" }, | 244 | { "Zoom In", SDLK_EQUALS, KMOD_PRIMARY, "zoom.delta arg:10" }, |
243 | { "Zoom Out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, | 245 | { "Zoom Out", SDLK_MINUS, KMOD_PRIMARY, "zoom.delta arg:-10" }, |
244 | { "Reset Zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, | 246 | { "Reset Zoom", SDLK_0, KMOD_PRIMARY, "zoom.set arg:100" }, |