fix: keep shifted character in menu accelerator (#29202)
* fix: correctly handle shifted char in accelerator * test: use actual accelerator of NSMenuItem * chore: simplify KeyboardCodeFromStr * chore: GetAcceleratorTextAt is testing only
This commit is contained in:
parent
31190d4c6d
commit
3cfe5c6a21
11 changed files with 168 additions and 83 deletions
|
@ -78,6 +78,9 @@ class Menu : public gin::Wrappable<Menu>,
|
|||
int positioning_item,
|
||||
base::OnceClosure callback) = 0;
|
||||
virtual void ClosePopupAt(int32_t window_id) = 0;
|
||||
#ifdef DCHECK_IS_ON
|
||||
virtual std::u16string GetAcceleratorTextAtForTesting(int index) const;
|
||||
#endif
|
||||
|
||||
std::unique_ptr<ElectronMenuModel> model_;
|
||||
Menu* parent_ = nullptr;
|
||||
|
@ -111,7 +114,6 @@ class Menu : public gin::Wrappable<Menu>,
|
|||
std::u16string GetLabelAt(int index) const;
|
||||
std::u16string GetSublabelAt(int index) const;
|
||||
std::u16string GetToolTipAt(int index) const;
|
||||
std::u16string GetAcceleratorTextAt(int index) const;
|
||||
bool IsItemCheckedAt(int index) const;
|
||||
bool IsEnabledAt(int index) const;
|
||||
bool IsVisibleAt(int index) const;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue