fix(ribbon): scrollable layer dropdown, stop mouse leak to viewport (#227)
The ribbon layer dropdown grew unbounded so a long layer list ran off the bottom of the screen with no way to scroll. Cap the panel height and make the list scrollable; short lists still shrink to fit. While a dropdown was open, the 3D viewport beneath it kept tracking the cursor over the panel's empty areas, and the OS cursor vanished there. In iced 0.14 mouse_area/opaque only capture button presses, never CursorMoved, so a higher stack layer can't swallow motion — gate it state-side instead: - ignore viewport motion in on_viewport_move while ribbon.open_dropdown is set - suppress the crosshair overlay's Hidden cursor (and crosshair draw) so the normal OS cursor shows over an open dropdown - route all ribbon dropdown backdrops through a shared dropdown_backdrop() Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
1b198adc10
commit
3da81571a1
4 changed files with 46 additions and 37 deletions
|
|
@ -482,6 +482,15 @@ pub(super) fn on_tick(&mut self, t: Instant) -> Task<Message> {
|
|||
}
|
||||
|
||||
pub(super) fn on_viewport_move(&mut self, p: Point) -> Task<Message> {
|
||||
// A ribbon dropdown is open over the viewport. Its backdrop
|
||||
// cannot swallow cursor motion — in iced 0.14 mouse_area/opaque
|
||||
// capture only button presses, never CursorMoved — so the move
|
||||
// leaks through the stack to the pane mouse_area beneath and
|
||||
// would track the crosshair over the dropdown's empty areas.
|
||||
// Drop the move here instead. (#227)
|
||||
if self.ribbon.open_dropdown.is_some() {
|
||||
return Task::none();
|
||||
}
|
||||
let i = self.active_tab;
|
||||
|
||||
// UCS icon grip drag: map the cursor onto the UCS plane and
|
||||
|
|
|
|||
Loading…
Reference in a new issue