diff --git a/src/librssguard/gui/notifications/toastnotificationsmanager.cpp b/src/librssguard/gui/notifications/toastnotificationsmanager.cpp index b0599d234..cb6235d61 100644 --- a/src/librssguard/gui/notifications/toastnotificationsmanager.cpp +++ b/src/librssguard/gui/notifications/toastnotificationsmanager.cpp @@ -151,7 +151,18 @@ void ToastNotificationsManager::makeSpaceForNotification(int height_to_make_spac switch (m_position) { case ToastNotificationsManager::TopLeft: case ToastNotificationsManager::TopRight: { - std::function shift_down = reverse ? [](int x, int y) {return x - y;} : [](int x, int y) {return x + y;}; + std::function 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 shift_up = reverse ? [](int x, int y) {return x + y;} : [](int x, int y) {return x - y;}; + std::function 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));