fix: pass button callback in constructor (#27545)
This commit is contained in:
parent
79b3393768
commit
6edf6c6a95
4 changed files with 22 additions and 12 deletions
|
@ -20,9 +20,10 @@
|
|||
|
||||
namespace electron {
|
||||
|
||||
SubmenuButton::SubmenuButton(const base::string16& title,
|
||||
SubmenuButton::SubmenuButton(PressedCallback callback,
|
||||
const base::string16& title,
|
||||
const SkColor& background_color)
|
||||
: views::MenuButton(PressedCallback(), gfx::RemoveAccelerator(title)),
|
||||
: views::MenuButton(callback, gfx::RemoveAccelerator(title)),
|
||||
background_color_(background_color) {
|
||||
#if defined(OS_LINUX)
|
||||
// Dont' use native style border.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue