mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2026-03-07 02:54:42 -07:00
FIX: no resource for the bitmap
JRIA: [STUDIO-13537] Change-Id: Ib7a128e85d64fa1b4a0c67b3be5f5a3ccb3dd927 (cherry picked from commit aff46bd1378a18cb3d181dbf947bed870c0fa2d0)
This commit is contained in:
parent
4b06a552b6
commit
b6a44b5eb1
1 changed files with 13 additions and 10 deletions
|
|
@ -1826,14 +1826,14 @@ AmsHumidityTipPopup::AmsHumidityTipPopup(wxWindow* parent)
|
|||
|
||||
void AmsHumidityTipPopup::set_humidity_level(int level)
|
||||
{
|
||||
current_humidity_level = level;
|
||||
if (current_humidity_level<= 0) {return;}
|
||||
|
||||
std::string mode_string = wxGetApp().dark_mode()?"_dark":"_light";
|
||||
|
||||
curr_humidity_img->SetBitmap(create_scaled_bitmap("hum_level" + std::to_string(current_humidity_level) + mode_string, this, 132));
|
||||
curr_humidity_img->Refresh();
|
||||
curr_humidity_img->Update();
|
||||
if (0 < current_humidity_level && current_humidity_level < 6)
|
||||
{
|
||||
current_humidity_level = level;
|
||||
std::string mode_string = wxGetApp().dark_mode()?"_dark":"_light";
|
||||
curr_humidity_img->SetBitmap(create_scaled_bitmap("hum_level" + std::to_string(current_humidity_level) + mode_string, this, 132));
|
||||
curr_humidity_img->Refresh();
|
||||
curr_humidity_img->Update();
|
||||
}
|
||||
}
|
||||
|
||||
void AmsHumidityTipPopup::msw_rescale()
|
||||
|
|
@ -1842,8 +1842,11 @@ void AmsHumidityTipPopup::msw_rescale()
|
|||
close_img.msw_rescale();
|
||||
|
||||
// current humidity level image
|
||||
std::string mode_string = wxGetApp().dark_mode() ? "_dark" : "_light";
|
||||
curr_humidity_img->SetBitmap(create_scaled_bitmap("hum_level" + std::to_string(current_humidity_level) + mode_string, this, 132));
|
||||
if (0 < current_humidity_level && current_humidity_level < 6)
|
||||
{
|
||||
std::string mode_string = wxGetApp().dark_mode() ? "_dark" : "_light";
|
||||
curr_humidity_img->SetBitmap(create_scaled_bitmap("hum_level" + std::to_string(current_humidity_level) + mode_string, this, 132));
|
||||
}
|
||||
|
||||
// the list
|
||||
humidity_level_list->msw_rescale();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue