Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions core/render.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ func (sc *Scene) applyStyleScene() {
// should be used by Widgets to rebuild things that are otherwise
// cached (e.g., Icon, TextCursor).
func (sc *Scene) doRebuild() {
sc.Stage.Sprites.Reset()
sc.updateScene()
sc.applyStyleScene()
sc.layoutRenderScene()
Expand Down
19 changes: 11 additions & 8 deletions core/renderwindow.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,6 @@ func (w *renderWindow) resized() {
return
}
// w.FocusInactivate()
// w.InactivateAllSprites()
if !w.isVisible() {
rc.visible = false
if DebugSettings.WinEventTrace {
Expand Down Expand Up @@ -497,14 +496,18 @@ func (w *renderWindow) handleWindowEvents(e events.Event) {
w.gotFocus = false
w.sendWinFocusEvent(events.WinFocusLost)
case events.ScreenUpdate:
if DebugSettings.WinEventTrace {
fmt.Printf("Win: %v ScreenUpdate\n", w.name)
}
w.resized()
// TODO: figure out how to restore this stuff without breaking window size on mobile

// TheWindowGeometryaver.AbortSave() // anything just prior to this is sus
// if !system.TheApp.NoScreens() {
// Settings.UpdateAll()
// WindowGeometrySave.RestoreAll()
// }
if !TheApp.Platform().IsMobile() { // native desktop
// TheWindowGeometryaver.AbortSave() // anything just prior to this is sus
if TheApp.NScreens() > 0 {
AppearanceSettings.Apply()
UpdateAll()
// WindowGeometrySave.RestoreAll()
}
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions core/stages.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ func (sm *stages) resize(rg math32.Geom2DInt) {
for _, kv := range sm.stack.Order {
st := kv.Value
if st.Type == WindowStage || (st.Type == DialogStage && st.FullWindow) {
st.Sprites.reset()
st.Scene.resize(rg)
} else {
st.Scene.fitInWindow(rg)
Expand Down
2 changes: 1 addition & 1 deletion texteditor/editor.go
Original file line number Diff line number Diff line change
Expand Up @@ -487,7 +487,7 @@ func (ed *Editor) styleEditor() {
ed.Buffer.SetHighlighting(highlighting.StyleDefault)
}
}
ed.WidgetBase.Style()
ed.Frame.Style()
ed.CursorWidth.ToDots(&ed.Styles.UnitContext)
}

Expand Down