提交 b08f6e66 编写于 作者: yanghye's avatar yanghye

v2.3.18 Fixed Chinese input and gtk3 issues for linux packagin

上级 7cdf4c31
......@@ -635,7 +635,7 @@ func (m *LCLBrowserWindow) DisableResize() {
return
}
m.WindowProperty().CanResize = false
m.SetBorderStyle(types.BsSingle)
m.TForm.SetBorderStyle(types.BsSingle)
}
//禁用系统菜单-同时禁用最小化,最大化,关闭按钮
......@@ -681,7 +681,7 @@ func (m *LCLBrowserWindow) EnableResize() {
return
}
m.WindowProperty().CanResize = true
m.SetBorderStyle(types.BsNone)
m.TForm.SetBorderStyle(types.BsSizeable)
}
//启用系统菜单-同时禁用最小化,最大化,关闭按钮
......
......@@ -12,25 +12,17 @@
package cef
import (
"github.com/energye/golcl/lcl/types"
"github.com/energye/golcl/lcl/win"
)
//显示标题栏
func (m *LCLBrowserWindow) ShowTitle() {
//win.SetWindowLong(m.Handle(), win.GWL_STYLE, uintptr(win.GetWindowLong(m.Handle(), win.GWL_STYLE)|win.WS_CAPTION))
//win.SetWindowPos(m.Handle(), m.Handle(), 0, 0, 0, 0, win.SWP_NOSIZE|win.SWP_NOMOVE|win.SWP_NOZORDER|win.SWP_NOACTIVATE|win.SWP_FRAMECHANGED)
if m.TForm == nil {
return
}
m.TForm.SetBorderStyle(types.BsSizeable)
win.SetWindowLong(m.Handle(), win.GWL_STYLE, uintptr(win.GetWindowLong(m.Handle(), win.GWL_STYLE)|win.WS_CAPTION))
win.SetWindowPos(m.Handle(), m.Handle(), 0, 0, 0, 0, win.SWP_NOSIZE|win.SWP_NOMOVE|win.SWP_NOZORDER|win.SWP_NOACTIVATE|win.SWP_FRAMECHANGED)
}
//隐藏标题栏
func (m *LCLBrowserWindow) HideTitle() {
//win.SetWindowLong(m.Handle(), win.GWL_STYLE, uintptr(win.GetWindowLong(m.Handle(), win.GWL_STYLE)&^win.WS_CAPTION))
//win.SetWindowPos(m.Handle(), m.Handle(), 0, 0, 0, 0, win.SWP_NOSIZE|win.SWP_NOMOVE|win.SWP_NOZORDER|win.SWP_NOACTIVATE|win.SWP_FRAMECHANGED)
if m.TForm == nil {
return
}
m.TForm.SetBorderStyle(types.BsNone)
win.SetWindowLong(m.Handle(), win.GWL_STYLE, uintptr(win.GetWindowLong(m.Handle(), win.GWL_STYLE)&^win.WS_CAPTION))
win.SetWindowPos(m.Handle(), m.Handle(), 0, 0, 0, 0, win.SWP_NOSIZE|win.SWP_NOMOVE|win.SWP_NOZORDER|win.SWP_NOACTIVATE|win.SWP_FRAMECHANGED)
}
......@@ -6,6 +6,7 @@ import (
"github.com/energye/energy/cef"
"github.com/energye/energy/common/assetserve"
"github.com/energye/golcl/lcl"
"github.com/energye/golcl/lcl/types"
)
//go:embed resources
......@@ -24,7 +25,10 @@ func main() {
//event.SetOnWidgetCompMsg(func(sender lcl.IObject, message types.TMessage, aHandled bool) {
// fmt.Println("SetOnWidgetCompMsg:", message)
//})
//browserWindow := window.AsLCLBrowserWindow().BrowserWindow()
browserWindow := window.AsLCLBrowserWindow().BrowserWindow()
//window.DisableResize()
browserWindow.BorderIcons().Exclude(types.BiHelp, types.BiMinimize, types.BiMaximize, types.BiSystemMenu)
window.HideTitle()
event.SetOnDraggableRegionsChanged(func(sender lcl.IObject, browser *cef.ICefBrowser, frame *cef.ICefFrame, regions *cef.TCefDraggableRegions) {
fmt.Println("RegionsCount:", regions.RegionsCount(), regions.Regions())
for i := 0; i < regions.RegionsCount(); i++ {
......@@ -33,6 +37,21 @@ func main() {
//win.SetWindowLong(browserWindow.Handle(), win.GWL_EXSTYLE, uintptr(win.GetWindowLong(handle, win.GWL_EXSTYLE)|win.WS_EX_LAYERED))
//win.SetLayeredWindowAttributes(browserWindow.Handle(), 0, 100, win.LWA_ALPHA)
})
// show or hide, caption bar
//go func() {
// var b = true
// for {
// time.Sleep(time.Second)
// cef.QueueAsyncCall(func(id int) {
// b = !b
// if b {
// window.ShowTitle()
// } else {
// window.HideTitle()
// }
// })
// }
//}()
})
cef.BrowserWindow.SetBrowserInitAfter(func(window cef.IBrowserWindow) {
//sys_tray.TrayMain()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册