feat: programmatically modify traffic light positioning (#22533)
* setter * getter * specs and docs * fixup Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
This commit is contained in:
parent
1811751c6c
commit
3e2cec83d9
7 changed files with 80 additions and 5 deletions
|
@ -814,6 +814,16 @@ void TopLevelWindow::SetVibrancy(v8::Isolate* isolate,
|
|||
window_->SetVibrancy(type);
|
||||
}
|
||||
|
||||
#if defined(OS_MACOSX)
|
||||
void TopLevelWindow::SetTrafficLightPosition(const gfx::Point& position) {
|
||||
window_->SetTrafficLightPosition(position);
|
||||
}
|
||||
|
||||
gfx::Point TopLevelWindow::GetTrafficLightPosition() const {
|
||||
return window_->GetTrafficLightPosition();
|
||||
}
|
||||
#endif
|
||||
|
||||
void TopLevelWindow::SetTouchBar(
|
||||
std::vector<gin_helper::PersistentDictionary> items) {
|
||||
window_->SetTouchBar(std::move(items));
|
||||
|
@ -1184,6 +1194,12 @@ void TopLevelWindow::BuildPrototype(v8::Isolate* isolate,
|
|||
.SetMethod("setAutoHideCursor", &TopLevelWindow::SetAutoHideCursor)
|
||||
#endif
|
||||
.SetMethod("setVibrancy", &TopLevelWindow::SetVibrancy)
|
||||
#if defined(OS_MACOSX)
|
||||
.SetMethod("setTrafficLightPosition",
|
||||
&TopLevelWindow::SetTrafficLightPosition)
|
||||
.SetMethod("getTrafficLightPosition",
|
||||
&TopLevelWindow::GetTrafficLightPosition)
|
||||
#endif
|
||||
.SetMethod("_setTouchBarItems", &TopLevelWindow::SetTouchBar)
|
||||
.SetMethod("_refreshTouchBarItem", &TopLevelWindow::RefreshTouchBarItem)
|
||||
.SetMethod("_setEscapeTouchBarItem",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue