fix: Check minSize constraints before resizing (backport: 3-0-x) (#15038)
This commit is contained in:
parent
8f743e6fbe
commit
524bb99948
2 changed files with 4 additions and 2 deletions
|
@ -376,8 +376,10 @@ gfx::Rect TopLevelWindow::GetContentBounds() {
|
|||
|
||||
void TopLevelWindow::SetSize(int width, int height, mate::Arguments* args) {
|
||||
bool animate = false;
|
||||
gfx::Size size = window_->GetMinimumSize();
|
||||
size.SetToMax(gfx::Size(width, height));
|
||||
args->GetNext(&animate);
|
||||
window_->SetSize(gfx::Size(width, height), animate);
|
||||
window_->SetSize(size, animate);
|
||||
}
|
||||
|
||||
std::vector<int> TopLevelWindow::GetSize() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue