ENH: optimize the display of drying left time

jira: [STUDIO-12863]
Change-Id: Id326bf25b5631c97e15e2fa8f7f74d41b84ca6ee
(cherry picked from commit e256324fb9eb299dae48e32193ce97b0b2b97f76)
This commit is contained in:
xin.zhang
2025-06-23 11:40:25 +08:00
committed by Noisyfox
parent 2d23db7890
commit 8dc43f1b67

View File

@@ -151,7 +151,23 @@ void uiAmsPercentHumidityDryPopup::UpdateContents()
if (m_left_dry_time > 0)
{
const wxString& time_str = wxString::Format(_L("%d : %d"), m_left_dry_time / 60, m_left_dry_time % 60);
wxString display_hour_str;
int left_hours = m_left_dry_time / 60;
if (left_hours < 10) {
display_hour_str = wxString::Format("0%d", left_hours);
} else {
display_hour_str = wxString::Format("%d", left_hours);
}
wxString display_min_str;
int left_minutes = m_left_dry_time % 60;
if (left_minutes < 10) {
display_min_str = wxString::Format("0%d", left_minutes);
} else {
display_min_str = wxString::Format("%d", left_minutes);
}
const wxString& time_str = wxString::Format("%s : %s", display_hour_str, display_min_str);
left_dry_time_label->SetLabel(time_str);
}
else