зеркало из https://github.com/electron/electron.git
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:
Родитель
279407f7a3
Коммит
a9b0111c3e
|
@ -442,6 +442,10 @@ gfx::Rect NativeWindowViews::GetBounds() {
|
|||
return window_->GetWindowBoundsInScreen();
|
||||
}
|
||||
|
||||
gfx::Size NativeWindowViews::GetContentSize() {
|
||||
return web_view_->size();
|
||||
}
|
||||
|
||||
void NativeWindowViews::SetResizable(bool resizable) {
|
||||
#if defined(OS_WIN)
|
||||
// WS_MAXIMIZEBOX => Maximize button
|
||||
|
|
|
@ -63,6 +63,7 @@ class NativeWindowViews : public NativeWindow,
|
|||
bool IsFullscreen() const override;
|
||||
void SetBounds(const gfx::Rect& bounds) override;
|
||||
gfx::Rect GetBounds() override;
|
||||
gfx::Size GetContentSize() override;
|
||||
void SetResizable(bool resizable) override;
|
||||
bool IsResizable() override;
|
||||
void SetAlwaysOnTop(bool top) override;
|
||||
|
|
Загрузка…
Ссылка в новой задаче