mirror of https://github.com/lapce/lapce.git
resize event
This commit is contained in:
parent
5c32606517
commit
5c57781c30
|
@ -6,6 +6,7 @@ import (
|
|||
|
||||
xi "github.com/dzhou121/xi-go/xi-client"
|
||||
"github.com/therecipe/qt/core"
|
||||
"github.com/therecipe/qt/gui"
|
||||
"github.com/therecipe/qt/widgets"
|
||||
)
|
||||
|
||||
|
@ -112,6 +113,12 @@ func (e *Editor) initMainWindow() {
|
|||
e.window.SetWindowTitle("Gonvim")
|
||||
e.window.SetContentsMargins(0, 0, 0, 0)
|
||||
e.window.SetMinimumSize2(e.width, e.height)
|
||||
e.window.ConnectResizeEvent(func(event *gui.QResizeEvent) {
|
||||
rect := e.window.Rect()
|
||||
e.width = rect.Width()
|
||||
e.height = rect.Height()
|
||||
e.equalWins()
|
||||
})
|
||||
|
||||
// NewView(e)
|
||||
|
||||
|
|
Loading…
Reference in New Issue