diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-09-15 17:08:33 +0200 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2022-11-28 13:32:48 +0100 |
commit | 2d002e42a8b6e711e3c9ca5b6dd3611e9d8426ab (patch) | |
tree | 2da22e8e37770c245be1f72f1c454a9c798b8db4 /src/core/ozone/platform_window_qt.cpp | |
parent | 4aa1690516fe76630a7cbb4816f56f0da081c596 (diff) |
Adaptations for 104-based
Change-Id: Ieb44b5c98b3342adca38916d8b77c54e8ed8e1d7
Reviewed-by: Peter Varga <pvarga@inf.u-szeged.hu>
Reviewed-by: Michal Klocek <michal.klocek@qt.io>
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( |