Skip to content

Land hover at once and fade it out - #10

Merged
kitlangton merged 1 commit into
devfrom
instant-hover
Oct 23, 2026
Merged

kitlangton merged 1 commit into
devfrom
instant-hover

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What it does. A .hover(color) highlight now appears on the first frame under the pointer and fades out over 0.1 s, like a native sidebar or menu. Before, it sprang in with SNAPPY, so sidebar rows and buttons visibly trailed the pointer.

How it works. When an element sets no .hover_motion, the runtime picks Anim::INSTANT for enter and a 0.1 s ease-out tween for exit. These are the curves rune-kit's menu already uses. .hover_motion(enter, exit) still overrides both. Hover groups' group_opacity reveals follow the same default.

Risk. Any app relying on the springy hover-in changes feel. Goldens aren't affected because they have no pointer.

Proof. New test hover_lands_at_once_and_fades_out: fully hovered on the first frame, partly faded one frame after leaving, and gone by 0.5 s. cargo test -p rune -p rune-kit --features rune-kit/markdown passes.

@kitlangton
kitlangton merged commit 95d9640 into dev Oct 23, 2026
@kitlangton
kitlangton deleted the instant-hover branch October 30, 2026 13:16
adeerkhan added a commit to adeerkhan/rune that referenced this pull request Nov 12, 2026
The completion thread polls the device in a loop, and `SurfaceRenderer` had no
`Drop`, so its fields dropped in declaration order: the wgpu `Device` first,
then the sender that ends the thread's wait. The thread was therefore still
polling a device that was being torn down, and the poll reached driver state
that had already gone.

It shows up as a SIGSEGV in the Vulkan driver at process exit:

  anomalyco#2  <ash::device::Device>::get_semaphore_counter_value ()
  anomalyco#3  <wgpu_hal::vulkan::Fence>::get_latest ()
  anomalyco#6  <wgpu_core::device::resource::Device>::maintain ()
  anomalyco#10 <wgpu::api::device::Device>::poll ()
  anomalyco#11 <rune::native_surface::pipeline::SurfaceRenderer>::with_pipeline ({closure#1})

The thread is now joined in `Drop`, before the device is dropped.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant