Skip to content

Commit

Permalink
Upgrades CEF 130.1.16: Add CEF API
Browse files Browse the repository at this point in the history
  • Loading branch information
sxmxta committed Nov 24, 2024
1 parent 3a766b4 commit fe7e8f2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions examples/context-menu/context_menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func main() {
menuIdEnable = model.CefMis.NextCommandId()
if isMenuIdEnable {
model.AddItem(menuIdEnable, "菜单-已启用")
model.SetColor(menuIdEnable, consts.CEF_MENU_COLOR_TEXT, consts.NewCefARGB(255, 111, 12, 200).ARGB())
model.SetColor(menuIdEnable, consts.CEF_MENU_COLOR_TEXT, cef.CefColorSetARGB(0, 111, 12, 200))
} else {
model.AddItem(menuIdEnable, "菜单-已禁用")
}
Expand All @@ -84,7 +84,7 @@ func main() {
//为什么要用Visible而不是不创建这个菜单? 因为菜单项的ID是动态的啊。
model.SetVisible(menuIdEnableCtl, !isMenuIdEnable)
if !isMenuIdEnable {
model.SetColor(menuIdEnableCtl, consts.CEF_MENU_COLOR_TEXT, consts.NewCefARGB(255, 222, 111, 0).ARGB())
model.SetColor(menuIdEnableCtl, consts.CEF_MENU_COLOR_TEXT, cef.CefColorSetARGB(0, 222, 111, 0))
}
model.AddSeparator()
//radio 1组
Expand Down
2 changes: 2 additions & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ type Single = Float32
type PChar = String
type Char = byte
type AnsiChar = Char

// 32-bit ARGB color value, not premultiplied. The color components are always in a known order. Equivalent to the SkColor type.
type TCefColor = UInt32
type Integer = Int32
type LongInt = Int32
Expand Down

0 comments on commit fe7e8f2

Please sign in to comment.