views: Use the quicker way of return content size
Converting content size to window size on high DPI systems will lose percise and have 1px offset sometimes.
This commit is contained in:
parent
279407f7a3
commit
a9b0111c3e
2 changed files with 5 additions and 0 deletions
|
@ -442,6 +442,10 @@ gfx::Rect NativeWindowViews::GetBounds() {
|
||||||
return window_->GetWindowBoundsInScreen();
|
return window_->GetWindowBoundsInScreen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gfx::Size NativeWindowViews::GetContentSize() {
|
||||||
|
return web_view_->size();
|
||||||
|
}
|
||||||
|
|
||||||
void NativeWindowViews::SetResizable(bool resizable) {
|
void NativeWindowViews::SetResizable(bool resizable) {
|
||||||
#if defined(OS_WIN)
|
#if defined(OS_WIN)
|
||||||
// WS_MAXIMIZEBOX => Maximize button
|
// WS_MAXIMIZEBOX => Maximize button
|
||||||
|
|
|
@ -63,6 +63,7 @@ class NativeWindowViews : public NativeWindow,
|
||||||
bool IsFullscreen() const override;
|
bool IsFullscreen() const override;
|
||||||
void SetBounds(const gfx::Rect& bounds) override;
|
void SetBounds(const gfx::Rect& bounds) override;
|
||||||
gfx::Rect GetBounds() override;
|
gfx::Rect GetBounds() override;
|
||||||
|
gfx::Size GetContentSize() override;
|
||||||
void SetResizable(bool resizable) override;
|
void SetResizable(bool resizable) override;
|
||||||
bool IsResizable() override;
|
bool IsResizable() override;
|
||||||
void SetAlwaysOnTop(bool top) override;
|
void SetAlwaysOnTop(bool top) override;
|
||||||
|
|
Loading…
Reference in a new issue