Skip to content

Commit

Permalink
Move autorotate to style_test + fix qt
Browse files Browse the repository at this point in the history
  • Loading branch information
schaumb committed Jan 15, 2024
1 parent 4feaa9a commit e43e26a
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 11 deletions.
3 changes: 0 additions & 3 deletions test/e2e/tests/config_tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,6 @@
},
"dimension_axis_density": {
"refs": ["9b330fb"]
},
"x_axis_label_autorotate": {
"refs": ["1dc0fcf"]
}
}
}
3 changes: 3 additions & 0 deletions test/e2e/tests/style_tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -1026,6 +1026,9 @@
},
"plot/yAxis/ticks/position/static_outside": {
"refs": ["aabb1c2"]
},
"plot/xAxis/label/autorotate": {
"refs": ["1dc0fcf"]
}
}
}
13 changes: 5 additions & 8 deletions test/qtest/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,27 +64,24 @@ bool Window::eventFilter(QObject *, QEvent *event)
if (type == QEvent::MouseButtonPress) {
auto *e = static_cast<QMouseEvent *>(event);
const Geom::Point pos(e->x(), e->y());
chart.getChart().onPointerDown({},
GUI::PointerEvent(0, pos));
chart.getChart().onPointerDown({0, pos});
return true;
}
if (type == QEvent::MouseButtonRelease) {
auto *e = static_cast<QMouseEvent *>(event);
const Geom::Point pos(e->x(), e->y());
chart.getChart().onPointerUp({},
GUI::PointerEvent(0, pos));
chart.getChart().onPointerUp({0, pos});
return true;
}
if (type == QEvent::HoverMove) {
auto *e = static_cast<QHoverEvent *>(event);
const Geom::Point pos(e->pos().x(), e->pos().y());
chart.getChart().onPointerMove({},
GUI::PointerEvent(0, pos));
chart.getChart().onPointerMove({0, pos});
return true;
}
if (type == QEvent::HoverLeave) {
chart.getChart().onPointerLeave({},
GUI::PointerEvent(0, Geom::Point::Invalid()));
chart.getChart().onPointerLeave(
{0, Geom::Point::Invalid()});
return true;
}
}
Expand Down

0 comments on commit e43e26a

Please sign in to comment.