ui: tooltips on icon buttons, and a count
IconButton names itself in a tooltip after a moment of hover, also while it is disabled (mute or deafen when not connected), and can show a neutral count at its top right (for pins and topics later). Tooltips are desktop only: the new Bridge.desktop is false in the Android app. Tooltip showed once (its Timer turned off its own binding) and stayed open after the pointer left. Both now use Slint's Tooltip element with our TooltipBubble: it opens at the pointer, closes when the pointer leaves, and lets clicks and hover through, which a PopupWindow of our own does not while it is open. A press closes it until the pointer leaves. The bubble sets its own preferred width, up to 400px, so long text wraps: the tooltip's popup takes that width, and a max-width would not narrow it. IconButton's look moves onto an inner rectangle: with an opacity and an animation on its root, Slint inlined it at each of its 100-odd uses, and the tooltip and count alone added 3.3 MB of generated code to a crate whose compile already peaks near 14 GB. Now the generated code is 1.1 MB smaller than before (70.7 MB). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01AVRENKftQqGoEeswiR9TDQ
This commit is contained in:
1 parent
d114444c04
commit
cdedb86b9c
10 files changed
+175
-83
No files matched your search
@@ -643,6 +643,7 @@ pub fn run(options: RunOptions) -> Result<()> {
|
||||
let bridge = ui.global::<Bridge>();
|
||||
bridge.set_app_name(voelin_platform::APP_NAME.into());
|
||||
bridge.set_app_version(env!("CARGO_PKG_VERSION").into());
|
||||
bridge.set_desktop(cfg!(not(target_os = "android")));
|
||||
let models = Models::new(&bridge);
|
||||
// Wayland and X11 find the desktop file (and icon) by this id.
|
||||
#[cfg(not(target_os = "android"))]
|
||||
|
||||
Reference in new issue
Block a user