feat: add menu item role palette
and header
(#47245)
* feat: add menu item role `palette` and `header` Co-authored-by: Gellert Hegyi <gellihegyi@gmail.com> * adds comments Co-authored-by: Gellert Hegyi <gellihegyi@gmail.com> * refactors new role items to new item types Co-authored-by: Gellert Hegyi <gellert@poolside.ai> * docs: custom type Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> * docs: note types only available on mac 14+ Co-authored-by: Samuel Maddock <smaddock@slack-corp.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Gellert Hegyi <gellihegyi@gmail.com> Co-authored-by: Gellert Hegyi <gellert@poolside.ai> Co-authored-by: Samuel Maddock <smaddock@slack-corp.com>
This commit is contained in:
parent
9e453030ae
commit
713030b21a
10 changed files with 61 additions and 8 deletions
|
@ -213,6 +213,10 @@ void Menu::SetRole(int index, const std::u16string& role) {
|
|||
model_->SetRole(index, role);
|
||||
}
|
||||
|
||||
void Menu::SetCustomType(int index, const std::u16string& customType) {
|
||||
model_->SetCustomType(index, customType);
|
||||
}
|
||||
|
||||
void Menu::Clear() {
|
||||
model_->Clear();
|
||||
}
|
||||
|
@ -286,6 +290,7 @@ void Menu::FillObjectTemplate(v8::Isolate* isolate,
|
|||
.SetMethod("setSublabel", &Menu::SetSublabel)
|
||||
.SetMethod("setToolTip", &Menu::SetToolTip)
|
||||
.SetMethod("setRole", &Menu::SetRole)
|
||||
.SetMethod("setCustomType", &Menu::SetCustomType)
|
||||
.SetMethod("clear", &Menu::Clear)
|
||||
.SetMethod("getIndexOfCommandId", &Menu::GetIndexOfCommandId)
|
||||
.SetMethod("getItemCount", &Menu::GetItemCount)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue