Skip to content

Commit

Permalink
Layout: Fix mouse issues high DPI displays
Browse files Browse the repository at this point in the history
Closes #34
  • Loading branch information
univrsal committed Jun 5, 2023
1 parent 60cb1f4 commit 3a5e9ce
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/layout.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,14 @@ void Layout::MouseMoved(QMouseEvent* e)
e->buttons(),
e->type());

auto* screen = m_durchblick->windowHandle()->screen();
binfo("screen: 0x%X", screen);
if (screen) {
d.x *= screen->devicePixelRatio();
d.y *= screen->devicePixelRatio();
binfo("Ratio: %.2f", screen->devicePixelRatio());
}

LayoutItem::Cell pos;
bool anything_hovered = false;
for (auto& Item : m_layout_items) {
Expand Down

0 comments on commit 3a5e9ce

Please sign in to comment.