diff options
Diffstat (limited to 'src/core/ozone/platform_window_qt.cpp')
-rw-r--r-- | src/core/ozone/platform_window_qt.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/core/ozone/platform_window_qt.cpp b/src/core/ozone/platform_window_qt.cpp index 01b0ae139..4a6331c61 100644 --- a/src/core/ozone/platform_window_qt.cpp +++ b/src/core/ozone/platform_window_qt.cpp @@ -24,7 +24,7 @@ PlatformWindowQt::~PlatformWindowQt() ui::PlatformEventSource::GetInstance()->RemovePlatformEventDispatcher(this); } -gfx::Rect PlatformWindowQt::GetBounds() const +gfx::Rect PlatformWindowQt::GetBoundsInPixels() const { return bounds_; } @@ -34,7 +34,7 @@ void PlatformWindowQt::Close() delegate_->OnClosed(); } -void PlatformWindowQt::SetBounds(const gfx::Rect& bounds) +void PlatformWindowQt::SetBoundsInPixels(const gfx::Rect& bounds) { if (bounds == bounds_) return; @@ -47,6 +47,16 @@ bool PlatformWindowQt::CanDispatchEvent(const ui::PlatformEvent& /*ne*/) return true; } +gfx::Rect PlatformWindowQt::GetBoundsInDIP() const +{ + return delegate_->ConvertRectToDIP(bounds_); +} + +void PlatformWindowQt::SetBoundsInDIP(const gfx::Rect &bounds_in_dip) +{ + SetBoundsInPixels(delegate_->ConvertRectToPixels(bounds_in_dip)); +} + uint32_t PlatformWindowQt::DispatchEvent(const ui::PlatformEvent& native_event) { DispatchEventFromNativeUiEvent( |