Commit 32ea1d3f authored by David Jarvie's avatar David Jarvie
Browse files

In right-to-left mode, select correct date for mouse click position

parent 265de2a8
Pipeline #71341 failed with stage
in 4 minutes and 54 seconds
......@@ -283,8 +283,9 @@ int DayMatrix::getDayIndex(const QPoint& pt) const
const int y = pt.y();
if (x < 0 || y < 0 || x > width() || y > height())
return NO_SELECTION;
const int xd = static_cast<int>(x / mDaySize.width());
const int i = 7 * int(y / mDaySize.height())
+ int((QApplication::isRightToLeft() ? 6 - x : x) / mDaySize.width());
+ (QApplication::isRightToLeft() ? 6 - xd : xd);
if (i < mTodayIndex || i > NUMDAYS-1)
return NO_SELECTION;
return i;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment