Resync the device tab widgets and add the AMS best-position popup

This commit is contained in:
SoftFever
2026-07-17 03:37:18 +08:00
parent 0feca8d442
commit d4e95e3269
17 changed files with 1975 additions and 517 deletions
@@ -23,16 +23,16 @@ uiAmsPercentHumidityDryPopup::uiAmsPercentHumidityDryPopup(wxWindow *parent)
: wxDialog(parent, wxID_ANY, "")
{
Create();
wxGetApp().UpdateDlgDarkUI(this);
wxGetApp().UpdateDlgDarkUI(this); // Orca: apply dark-mode theming to the popup
}
void uiAmsPercentHumidityDryPopup::Create()
{
// create images
idle_img = ScalableBitmap(this, "ams_drying", 16);
drying_img = ScalableBitmap(this, "ams_is_drying", 16);
drying_img = ScalableBitmap(this, "ams_is_drying", 16); // Orca: use the drying-state icon
// background
// background
SetBackgroundColour(*wxWHITE);
// create title sizer
@@ -147,7 +147,8 @@ void uiAmsPercentHumidityDryPopup::UpdateContents()
// table grid
const wxString& humidity_str = wxString::Format("%d%%", m_humidity_percent);
m_humidity_label->SetLabel(humidity_str);
const wxString& temp_str = wxString::Format(wxString::FromUTF8(u8"%d\u2103" /* °C */), (int)std::round(m_current_temperature));
// Orca: format the temperature with an explicit UTF-8 \u2103 (no translation of a units-only format)
const wxString& temp_str = wxString::Format(wxString::FromUTF8(u8"%d\u2103" /* \u00b0C */), (int)std::round(m_current_temperature));
m_temperature_label->SetLabel(temp_str);
if (m_left_dry_time > 0)