Fix calculating min/max size in frameless views
The minimum and maximum size that frameless windows had used, was incorrect. It included the border, so when it was called it actually added that to the size, so window increased in size. The fix makes sure that the view will use the frameless size. This fixes #2945 and partially fixes #1806 (it also refers to some other issues with hidpi which might still exist).
This commit is contained in:
parent
8c31c7fb59
commit
aea1f8aebb
3 changed files with 35 additions and 4 deletions
|
@ -104,11 +104,15 @@ gfx::Size FramelessView::GetPreferredSize() const {
|
|||
}
|
||||
|
||||
gfx::Size FramelessView::GetMinimumSize() const {
|
||||
return window_->GetMinimumSize();
|
||||
gfx::Size size = window_->WindowSizeToFramelessSize(
|
||||
window_->GetMinimumSize());
|
||||
return size;
|
||||
}
|
||||
|
||||
gfx::Size FramelessView::GetMaximumSize() const {
|
||||
return window_->GetMaximumSize();
|
||||
gfx::Size size = window_->WindowSizeToFramelessSize(
|
||||
window_->GetMaximumSize());
|
||||
return size;
|
||||
}
|
||||
|
||||
const char* FramelessView::GetClassName() const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue