feat: make win.setAspectRatio() work on Windows (#26941)
* feat: make win.setAspectRatio() work on Windows * update patches Co-authored-by: Electron Bot <electron@github.com>
This commit is contained in:
parent
16c864a932
commit
5f99569b6c
6 changed files with 51 additions and 5 deletions
|
@ -114,7 +114,10 @@ gfx::Size FramelessView::GetMinimumSize() const {
|
|||
}
|
||||
|
||||
gfx::Size FramelessView::GetMaximumSize() const {
|
||||
return window_->GetContentMaximumSize();
|
||||
gfx::Size size = window_->GetContentMaximumSize();
|
||||
// Electron public APIs returns (0, 0) when maximum size is not set, but it
|
||||
// would break internal window APIs like HWNDMessageHandler::SetAspectRatio.
|
||||
return size.IsEmpty() ? gfx::Size(INT_MAX, INT_MAX) : size;
|
||||
}
|
||||
|
||||
const char* FramelessView::GetClassName() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue