win: Min/max size uses scaled DPI size.
This commit is contained in:
parent
6de595f036
commit
8f94d5886d
3 changed files with 14 additions and 0 deletions
|
@ -15,6 +15,7 @@ namespace {
|
|||
|
||||
const int kResizeInsideBoundsSize = 5;
|
||||
const int kResizeAreaCornerSize = 16;
|
||||
|
||||
const char kViewClassName[] = "FramelessView";
|
||||
|
||||
} // namespace
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
#include "atom/browser/ui/views/win_frame_view.h"
|
||||
|
||||
#include "atom/browser/native_window_views.h"
|
||||
#include "ui/gfx/win/dpi.h"
|
||||
#include "ui/views/widget/widget.h"
|
||||
#include "ui/views/win/hwnd_util.h"
|
||||
|
||||
|
@ -38,6 +39,16 @@ int WinFrameView::NonClientHitTest(const gfx::Point& point) {
|
|||
return FramelessView::NonClientHitTest(point);
|
||||
}
|
||||
|
||||
gfx::Size WinFrameView::GetMinimumSize() {
|
||||
gfx::Size size = FramelessView::GetMinimumSize();
|
||||
return gfx::win::DIPToScreenSize(size);
|
||||
}
|
||||
|
||||
gfx::Size WinFrameView::GetMaximumSize() {
|
||||
gfx::Size size = FramelessView::GetMaximumSize();
|
||||
return gfx::win::DIPToScreenSize(size);
|
||||
}
|
||||
|
||||
const char* WinFrameView::GetClassName() const {
|
||||
return kViewClassName;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,8 @@ class WinFrameView : public FramelessView {
|
|||
virtual int NonClientHitTest(const gfx::Point& point) OVERRIDE;
|
||||
|
||||
// views::View:
|
||||
virtual gfx::Size GetMinimumSize() OVERRIDE;
|
||||
virtual gfx::Size GetMaximumSize() OVERRIDE;
|
||||
virtual const char* GetClassName() const OVERRIDE;
|
||||
|
||||
private:
|
||||
|
|
Loading…
Reference in a new issue