mirror of
https://github.com/martinrotter/rssguard.git
synced 2025-02-04 03:08:04 +01:00
fix qt5 build
This commit is contained in:
parent
28b6547da6
commit
46631b3a58
@ -151,7 +151,18 @@ void ToastNotificationsManager::makeSpaceForNotification(int height_to_make_spac
|
||||
switch (m_position) {
|
||||
case ToastNotificationsManager::TopLeft:
|
||||
case ToastNotificationsManager::TopRight: {
|
||||
std::function<int(int,int)> shift_down = reverse ? [](int x, int y) {return x - y;} : [](int x, int y) {return x + y;};
|
||||
std::function<int(int, int)> shift_down;
|
||||
|
||||
if (reverse) {
|
||||
shift_down = [](int x, int y) {
|
||||
return x - y;
|
||||
};
|
||||
}
|
||||
else {
|
||||
shift_down = [](int x, int y) {
|
||||
return x + y;
|
||||
};
|
||||
}
|
||||
|
||||
// Move it all down.
|
||||
notif->move(notif->pos().x(), shift_down(notif->pos().y(), (height_to_make_space + NOTIFICATIONS_MARGIN)));
|
||||
@ -160,7 +171,18 @@ void ToastNotificationsManager::makeSpaceForNotification(int height_to_make_spac
|
||||
|
||||
case ToastNotificationsManager::BottomLeft:
|
||||
case ToastNotificationsManager::BottomRight: {
|
||||
std::function<int(int,int)> shift_up = reverse ? [](int x, int y) {return x + y;} : [](int x, int y) {return x - y;};
|
||||
std::function<int(int, int)> shift_up;
|
||||
|
||||
if (reverse) {
|
||||
shift_up = [](int x, int y) {
|
||||
return x + y;
|
||||
};
|
||||
}
|
||||
else {
|
||||
shift_up = [](int x, int y) {
|
||||
return x - y;
|
||||
};
|
||||
}
|
||||
|
||||
// Move it all up.
|
||||
notif->move(notif->pos().x(), shift_up(notif->pos().y(), height_to_make_space + NOTIFICATIONS_MARGIN));
|
||||
|
Loading…
x
Reference in New Issue
Block a user