diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-18 11:26:11 +0200 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-03-18 11:26:11 +0200 |
commit | fa174461abdc5c33de16428109c7d46b4f150093 (patch) | |
tree | 21cf16a2426f8a6b76195e1816ceea69778fbd70 /src/ui/util.c | |
parent | 21f6248a3dc906a0c296b937dd1aa697784e6ea3 (diff) |
Scrollbar fading and periodic commands
Added a new mechanism to issue periodic but not per-frame commands. This is used for main-thread operations like checking if it's time to fade away the scrollbars.
Scrollbars are faded away completely on Apple platforms. Adjusted list right margins accordingly.
Diffstat (limited to 'src/ui/util.c')
-rw-r--r-- | src/ui/util.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ui/util.c b/src/ui/util.c index e07e036a..13d1bf78 100644 --- a/src/ui/util.c +++ b/src/ui/util.c | |||
@@ -401,6 +401,7 @@ static iBool isCommandIgnoredByMenus_(const char *cmd) { | |||
401 | equal_Command(cmd, "document.request.updated") || | 401 | equal_Command(cmd, "document.request.updated") || |
402 | equal_Command(cmd, "document.request.finished") || | 402 | equal_Command(cmd, "document.request.finished") || |
403 | equal_Command(cmd, "document.changed") || | 403 | equal_Command(cmd, "document.changed") || |
404 | equal_Command(cmd, "scrollbar.fade") || | ||
404 | equal_Command(cmd, "visited.changed") || | 405 | equal_Command(cmd, "visited.changed") || |
405 | (deviceType_App() == desktop_AppDeviceType && equal_Command(cmd, "window.resized")) || | 406 | (deviceType_App() == desktop_AppDeviceType && equal_Command(cmd, "window.resized")) || |
406 | equal_Command(cmd, "widget.overflow") || | 407 | equal_Command(cmd, "widget.overflow") || |
@@ -1634,12 +1635,14 @@ void updateValueInput_Widget(iWidget *d, const char *title, const char *prompt) | |||
1634 | 1635 | ||
1635 | static iBool messageHandler_(iWidget *msg, const char *cmd) { | 1636 | static iBool messageHandler_(iWidget *msg, const char *cmd) { |
1636 | /* Almost any command dismisses the sheet. */ | 1637 | /* Almost any command dismisses the sheet. */ |
1638 | /* TODO: Use a "notification" prefix (like `) to ignore all types of commands line this? */ | ||
1637 | if (!(equal_Command(cmd, "media.updated") || | 1639 | if (!(equal_Command(cmd, "media.updated") || |
1638 | equal_Command(cmd, "media.player.update") || | 1640 | equal_Command(cmd, "media.player.update") || |
1639 | equal_Command(cmd, "bookmarks.request.finished") || | 1641 | equal_Command(cmd, "bookmarks.request.finished") || |
1640 | equal_Command(cmd, "document.autoreload") || | 1642 | equal_Command(cmd, "document.autoreload") || |
1641 | equal_Command(cmd, "document.reload") || | 1643 | equal_Command(cmd, "document.reload") || |
1642 | equal_Command(cmd, "document.request.updated") || | 1644 | equal_Command(cmd, "document.request.updated") || |
1645 | equal_Command(cmd, "scrollbar.fade") || | ||
1643 | equal_Command(cmd, "widget.overflow") || | 1646 | equal_Command(cmd, "widget.overflow") || |
1644 | startsWith_CStr(cmd, "window."))) { | 1647 | startsWith_CStr(cmd, "window."))) { |
1645 | destroy_Widget(msg); | 1648 | destroy_Widget(msg); |