From e5464259ffe9a6834ee1f4913965089112e9eecb Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Sun, 5 Dec 2021 22:04:44 +0200 Subject: Widget: Added flag to always fade the background --- src/ui/root.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/ui/root.c') 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) { /* Place the sidebar next to or under doctabs depending on orientation. */ iSidebarWidget *sidebar = findChild_Widget(root, "sidebar"); removeChild_Widget(parent_Widget(sidebar), sidebar); + iChangeFlags(as_Widget(sidebar)->flags2, fadeBackground_WidgetFlag2, isPortrait_App()); if (isLandscape_App()) { setVisualOffset_Widget(as_Widget(sidebar), 0, 0, 0); addChildPos_Widget(findChild_Widget(root, "tabs.content"), iClob(sidebar), front_WidgetAddPos); @@ -829,6 +830,8 @@ static iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) { } else if (equal_Command(cmd, "navbar.clear")) { iInputWidget *url = findChild_Widget(navBar, "url"); + setText_InputWidget(url, collectNew_String()); +#if 0 selectAll_InputWidget(url); /* Emulate a Backspace keypress. */ class_InputWidget(url)->processEvent( @@ -837,6 +840,7 @@ static iBool handleNavBarCommands_(iWidget *navBar, const char *cmd) { .timestamp = SDL_GetTicks(), .state = SDL_PRESSED, .keysym = { .sym = SDLK_BACKSPACE } }); +#endif return iTrue; } else if (equal_Command(cmd, "navbar.cancel")) { -- cgit v1.2.3