From e8d4e7008b69684ea537b3cf524bd24704a748b5 Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Sun, 3 Oct 2021 21:46:36 -0700 Subject: [PATCH] MouseMove event and increase window title font size --- supervisor.go | 7 +++++++ window.go | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/supervisor.go b/supervisor.go index 202695e..afab822 100644 --- a/supervisor.go +++ b/supervisor.go @@ -15,6 +15,7 @@ type Event int const ( NullEvent Event = iota MouseOver + MouseMove MouseOut MouseDown MouseUp @@ -351,6 +352,12 @@ func (s *Supervisor) runWidgetEvents(XY render.Point, ev *event.State, s.hovering[id] = nil } + // Mouse movement. NOTE: it is intentional that this fires on + // every tick even if XY was the same as last time. + handle(w.Event(MouseMove, EventData{ + Point: XY, + })) + isClicked, _ := s.clicked[id] if ev.Button1 { if !isClicked { diff --git a/window.go b/window.go index 22340a7..d66685f 100644 --- a/window.go +++ b/window.go @@ -121,7 +121,7 @@ func (w *Window) setupTitleBar() (*Frame, *Label) { TextVariable: &w.Title, Font: render.Text{ Color: w.ActiveTitleForeground, - Size: 10, + Size: 11, Stroke: w.ActiveTitleBackground.Darken(40), Padding: 2, },