ENH: notifications are expanded by default
Jira: STUDIO-4156 Change-Id: I9f1d95694b1725ecdf3973037b3df71d3a16fa98
This commit is contained in:
parent
8af1359868
commit
ca3a196ec6
|
@ -258,7 +258,6 @@ void NotificationManager::PopNotification::render(GLCanvas3D& canvas, float init
|
||||||
|
|
||||||
// find if hovered FIXME: do it only in update state?
|
// find if hovered FIXME: do it only in update state?
|
||||||
if (m_state == EState::Hovered) {
|
if (m_state == EState::Hovered) {
|
||||||
m_state = EState::Unknown;
|
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -545,10 +544,13 @@ void NotificationManager::PopNotification::init()
|
||||||
count_spaces();
|
count_spaces();
|
||||||
count_lines();
|
count_lines();
|
||||||
|
|
||||||
if (m_lines_count == 3)
|
if (m_lines_count <= 6) {
|
||||||
m_multiline = true;
|
if (m_state == EState::Unknown) // if is default state
|
||||||
|
m_multiline = true;
|
||||||
|
}
|
||||||
|
|
||||||
m_notification_start = GLCanvas3D::timestamp_now();
|
m_notification_start = GLCanvas3D::timestamp_now();
|
||||||
if (m_state == EState::Unknown)
|
if (m_state == EState::Unknown || m_state == EState::Hovered)
|
||||||
m_state = EState::Shown;
|
m_state = EState::Shown;
|
||||||
}
|
}
|
||||||
void NotificationManager::PopNotification::set_next_window_size(ImGuiWrapper& imgui)
|
void NotificationManager::PopNotification::set_next_window_size(ImGuiWrapper& imgui)
|
||||||
|
@ -972,7 +974,6 @@ bool NotificationManager::PopNotification::update_state(bool paused, const int64
|
||||||
|
|
||||||
// reset timers - hovered state is set in render
|
// reset timers - hovered state is set in render
|
||||||
if (m_state == EState::Hovered) {
|
if (m_state == EState::Hovered) {
|
||||||
m_state = EState::Unknown;
|
|
||||||
init();
|
init();
|
||||||
// Timers when not fading
|
// Timers when not fading
|
||||||
} else if (m_state != EState::NotFading && m_state != EState::FadingOut && m_state != EState::ClosePending && m_state != EState::Finished && get_duration() != 0 && !paused) {
|
} else if (m_state != EState::NotFading && m_state != EState::FadingOut && m_state != EState::ClosePending && m_state != EState::Finished && get_duration() != 0 && !paused) {
|
||||||
|
@ -1701,6 +1702,7 @@ void NotificationManager::ProgressIndicatorNotification::init()
|
||||||
else {
|
else {
|
||||||
m_lines_count = 2;
|
m_lines_count = 2;
|
||||||
m_endlines.push_back(m_endlines.back());
|
m_endlines.push_back(m_endlines.back());
|
||||||
|
m_multiline = false;
|
||||||
}
|
}
|
||||||
switch (m_progress_state)
|
switch (m_progress_state)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue