MouseMove event and increase window title font size
This commit is contained in:
parent
f6703bf1ba
commit
e8d4e7008b
|
@ -15,6 +15,7 @@ type Event int
|
||||||
const (
|
const (
|
||||||
NullEvent Event = iota
|
NullEvent Event = iota
|
||||||
MouseOver
|
MouseOver
|
||||||
|
MouseMove
|
||||||
MouseOut
|
MouseOut
|
||||||
MouseDown
|
MouseDown
|
||||||
MouseUp
|
MouseUp
|
||||||
|
@ -351,6 +352,12 @@ func (s *Supervisor) runWidgetEvents(XY render.Point, ev *event.State,
|
||||||
s.hovering[id] = nil
|
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]
|
isClicked, _ := s.clicked[id]
|
||||||
if ev.Button1 {
|
if ev.Button1 {
|
||||||
if !isClicked {
|
if !isClicked {
|
||||||
|
|
|
@ -121,7 +121,7 @@ func (w *Window) setupTitleBar() (*Frame, *Label) {
|
||||||
TextVariable: &w.Title,
|
TextVariable: &w.Title,
|
||||||
Font: render.Text{
|
Font: render.Text{
|
||||||
Color: w.ActiveTitleForeground,
|
Color: w.ActiveTitleForeground,
|
||||||
Size: 10,
|
Size: 11,
|
||||||
Stroke: w.ActiveTitleBackground.Darken(40),
|
Stroke: w.ActiveTitleBackground.Darken(40),
|
||||||
Padding: 2,
|
Padding: 2,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user