Minor improvement in ChangePixelFormat dialog

Moved the progress bar in other at the left of the OK button and the
progress bar appears only if we have to report a progress value > 0
This commit is contained in:
David Capello 2019-04-17 00:07:33 -03:00
parent 9746a30564
commit dba3f3cdfb
2 changed files with 12 additions and 4 deletions

View File

@ -7,7 +7,6 @@
<view id="color_mode_view" expansive="true">
<listbox id="color_mode" />
</view>
<slider min="0" max="100" id="progress" minwidth="100" />
<hbox id="dithering_placeholder" />
<hbox id="amount">
<label text="@.amount" />
@ -17,6 +16,7 @@
<check text="@.flatten" id="flatten" />
<separator horizontal="true" />
<hbox>
<slider min="0" max="100" id="progress" minwidth="100" />
<boxfiller />
<hbox homogeneous="true">
<button text="@general.ok" closewindow="true" id="ok" magnet="true" minwidth="60" />

View File

@ -326,7 +326,7 @@ private:
m_editor->invalidate();
progress()->setValue(0);
progress()->setVisible(true);
progress()->setVisible(false);
layout();
m_bgThread.reset(
@ -361,8 +361,16 @@ private:
progress()->setVisible(false);
layout();
}
else
progress()->setValue(100 * m_bgThread->progress());
else {
int v = 100 * m_bgThread->progress();
if (v > 0) {
progress()->setValue(v);
if (!progress()->isVisible()) {
progress()->setVisible(true);
layout();
}
}
}
m_editor->invalidate();
}