Beam cursor

This commit is contained in:
2026-07-07 15:54:35 +02:00
parent 4727e51d1b
commit c9c91b6aa2
+11 -1
View File
@@ -40,7 +40,7 @@ use winit::event_loop::{
};
use winit::keyboard::{Key, NamedKey};
use winit::platform::wayland::EventLoopBuilderExtWayland;
use winit::window::{Window, WindowId};
use winit::window::{CursorIcon, Window, WindowId};
// ═══════════════════════════════════════════════════════════════════════════════
// PANE
@@ -3230,6 +3230,16 @@ impl ApplicationHandler<UserEvent> for App {
None
};
// Set cursor icon to IBeam when hovering over a pane
if let Some(window) = &self.window {
let icon = if pane_geom.is_some() {
CursorIcon::Text
} else {
CursorIcon::Default
};
window.set_cursor(icon);
}
// Switch focus if dragging on a different pane
if self.mouse_down_pos.is_some() {
if let Some(geom) = &pane_geom {