When a window resizes larger such that content no longer needs
scrolling, scroll_opt retains its stale offset value. Since no scroll
event fires, visible_rect was calculated with an out-of-bounds offset,
causing items at the top to be culled and not rendered.
Fix by caching content_height from each render pass and using it to
clamp scroll_opt when building visible_rect.
Per the FreeDesktop Desktop Entry spec, the Icon field can be either
an icon name (looked up in the theme) or an absolute path to an image.
Previously, all Icon values were passed to `widget::icon::from_name()`,
which only works for icon names.
This adds a `desktop_icon_handle()` helper that checks if the path is
absolute and exists, using `widget::icon::from_path()` for absolute
paths and `widget::icon::from_name()` for icon names.
Fixes: https://github.com/pop-os/cosmic-epoch/issues/2697
Since we already depend on `rustc-hash` transiently, this doesn't add
any more dependencies. As long as DOS attacks aren't a concern (which I
don't think they are?), this should be free performance.
In my (admittedly naive) testing, this really improved CPU usage in some
cases, which is pretty nice to get for free.
Since `Element` isn't `Sync` and `ArcElementWrapper` doesn't need to be
sent across threads, the overhead from using `Arc<Mutex>` isn't really
needed. Using an `Rc<RefCell>` has the same effect, but is faster and
isn't thread-safe.
Updates all dependencies other than ICU.
Enables the `dbus-config` libcosmic feature to fix theming responsiveness.
Also prevents the trash and network drive layer container from touching the edge of the window.
Closes: #1157
The fix splits the "canceled" and "failed" states for OperationError. It
also preserves that state because some functions overwrote the state by
rewrapping the error.
This fixes a bug where right-clicking a file while the context menu was open
for another file would open another context menu that couldn't be closed.
The new behavior is to close the context menu.