mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +00:00
Fix notification position on scaling (#9982)
Update NotificationManager.cpp
This commit is contained in:
@@ -2537,19 +2537,19 @@ void NotificationManager::render_notifications(GLCanvas3D &canvas, float overlay
|
|||||||
{
|
{
|
||||||
sort_notifications();
|
sort_notifications();
|
||||||
|
|
||||||
float bottom_up_last_y = bottom_margin * m_scale;
|
float bottom_up_last_y = bottom_margin; // ORCA dont scale margins
|
||||||
|
|
||||||
int i = 0;
|
int i = 0;
|
||||||
for (const auto& notification : m_pop_notifications) {
|
for (const auto& notification : m_pop_notifications) {
|
||||||
if (notification->get_data().level == NotificationLevel::ErrorNotificationLevel || notification->get_data().level == NotificationLevel::SeriousWarningNotificationLevel) {
|
if (notification->get_data().level == NotificationLevel::ErrorNotificationLevel || notification->get_data().level == NotificationLevel::SeriousWarningNotificationLevel) {
|
||||||
notification->bbl_render_block_notification(canvas, bottom_up_last_y, m_move_from_overlay && !m_in_preview, overlay_width * m_scale, right_margin * m_scale);
|
notification->bbl_render_block_notification(canvas, bottom_up_last_y, m_move_from_overlay && !m_in_preview, overlay_width * m_scale, right_margin); // ORCA dont scale margins
|
||||||
if (notification->get_state() != PopNotification::EState::Finished)
|
if (notification->get_state() != PopNotification::EState::Finished)
|
||||||
bottom_up_last_y = notification->get_top() + GAP_WIDTH;
|
bottom_up_last_y = notification->get_top() + GAP_WIDTH;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (notification->get_state() != PopNotification::EState::Hidden && notification->get_state() != PopNotification::EState::Finished) {
|
if (notification->get_state() != PopNotification::EState::Hidden && notification->get_state() != PopNotification::EState::Finished) {
|
||||||
i++;
|
i++;
|
||||||
notification->render(canvas, bottom_up_last_y, m_move_from_overlay && !m_in_preview, overlay_width * m_scale, right_margin * m_scale);
|
notification->render(canvas, bottom_up_last_y, m_move_from_overlay && !m_in_preview, overlay_width * m_scale, right_margin); // ORCA dont scale margins
|
||||||
if (notification->get_state() != PopNotification::EState::Finished)
|
if (notification->get_state() != PopNotification::EState::Finished)
|
||||||
bottom_up_last_y = notification->get_top() + GAP_WIDTH;
|
bottom_up_last_y = notification->get_top() + GAP_WIDTH;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user