Skip to content

Commit

Permalink
U: demo frameless
Browse files Browse the repository at this point in the history
  • Loading branch information
sxmxta committed Apr 15, 2024
1 parent 9f2126d commit c8ac6e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/frameless/frameless.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import (
"github.com/energye/energy/v2/cef"
"github.com/energye/energy/v2/cef/ipc"
"github.com/energye/energy/v2/cef/ipc/context"
"github.com/energye/energy/v2/common"
"github.com/energye/energy/v2/examples/common/tray"
_ "github.com/energye/energy/v2/examples/syso"
"github.com/energye/energy/v2/pkgs/assetserve"
Expand All @@ -40,7 +39,7 @@ func main() {
cef.GlobalInit(nil, resources)
//创建应用
app := cef.NewApplication()
// 强制使用VF窗口模式, VF窗口是chromium runtime创建的
// 强制使用VF窗口模式, VF窗口是ViewsFramework"创建的
//app.EnableVFWindow(true)

//指定一个URL地址,或本地html文件目录
Expand Down Expand Up @@ -88,7 +87,8 @@ func main() {

cef.BrowserWindow.SetBrowserInit(func(event *cef.BrowserEvent, window cef.IBrowserWindow) {
//window.AsLCLBrowserWindow().FramelessForLine()
if window.IsLCL() && common.IsWindows() {
enableBrowserTitleBar := false
if window.IsLCL() && enableBrowserTitleBar /*&& common.IsWindows()*/ {
// 边框圆角, 仅LCL
//window.AsLCLBrowserWindow().SetRoundRectRgn(10) // WindowParent 未铺满窗口会有严重的闪烁
var (
Expand Down

0 comments on commit c8ac6e7

Please sign in to comment.