summaryrefslogtreecommitdiff
path: root/src/ui/root.c
diff options
context:
space:
mode:
authorJaakko Keränen <jaakko.keranen@iki.fi>2021-12-05 22:04:44 +0200
committerJaakko Keränen <jaakko.keranen@iki.fi>2021-12-05 22:04:44 +0200
commite5464259ffe9a6834ee1f4913965089112e9eecb (patch)
treebced638a01d3274dad532b7627c9484bbf78b468 /src/ui/root.c
parent4f39ded4a343aabd25067ee5f8f1ff061af71eb0 (diff)
Widget: Added flag to always fade the background
Diffstat (limited to 'src/ui/root.c')
-rw-r--r--src/ui/root.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ui/root.c b/src/ui/root.c
index 28aa4b92..18a71200 100644
--- a/src/ui/root.c
+++ b/src/ui/root.c
@@ -490,6 +490,7 @@ static iBool handleRootCommands_(iWidget *root, const char *cmd) {
490 /* Place the sidebar next to or under doctabs depending on orientation. */ 490 /* Place the sidebar next to or under doctabs depending on orientation. */
491 iSidebarWidget *sidebar = findChild_Widget(root, "sidebar"); 491 iSidebarWidget *sidebar = findChild_Widget(root, "sidebar");
492 removeChild_Widget(parent_Widget(sidebar), sidebar); 492 removeChild_Widget(parent_Widget(sidebar), sidebar);
493 iChangeFlags(as_Widget(sidebar)->flags2, fadeBackground_WidgetFlag2, isPortrait_App());
493 if (isLandscape_App()) { 494 if (isLandscape_App()) {
494 setVisualOffset_Widget(as_Widget(sidebar), 0, 0, 0); 495 setVisualOffset_Widget(as_Widget(sidebar), 0, 0, 0);
495 addChildPos_Widget(findChild_Widget(root, "tabs.content"), iClob(sidebar), front_WidgetAddPos); 496 addChildPos_Widget(findChild_Widget(root, "tabs.content"), iClob(sidebar), front_WidgetAddPos);
@@ -829,6 +830,8 @@ static iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) {
829 } 830 }
830 else if (equal_Command(cmd, "navbar.clear")) { 831 else if (equal_Command(cmd, "navbar.clear")) {
831 iInputWidget *url = findChild_Widget(navBar, "url"); 832 iInputWidget *url = findChild_Widget(navBar, "url");
833 setText_InputWidget(url, collectNew_String());
834#if 0
832 selectAll_InputWidget(url); 835 selectAll_InputWidget(url);
833 /* Emulate a Backspace keypress. */ 836 /* Emulate a Backspace keypress. */
834 class_InputWidget(url)->processEvent( 837 class_InputWidget(url)->processEvent(
@@ -837,6 +840,7 @@ static iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) {
837 .timestamp = SDL_GetTicks(), 840 .timestamp = SDL_GetTicks(),
838 .state = SDL_PRESSED, 841 .state = SDL_PRESSED,
839 .keysym = { .sym = SDLK_BACKSPACE } }); 842 .keysym = { .sym = SDLK_BACKSPACE } });
843#endif
840 return iTrue; 844 return iTrue;
841 } 845 }
842 else if (equal_Command(cmd, "navbar.cancel")) { 846 else if (equal_Command(cmd, "navbar.cancel")) {