mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 03:13:39 +00:00
FIX: no resource for the bitmap
JRIA: [STUDIO-13537] Change-Id: Ib7a128e85d64fa1b4a0c67b3be5f5a3ccb3dd927 (cherry picked from commit aff46bd1378a18cb3d181dbf947bed870c0fa2d0)
This commit is contained in:
@@ -1826,14 +1826,14 @@ AmsHumidityTipPopup::AmsHumidityTipPopup(wxWindow* parent)
|
|||||||
|
|
||||||
void AmsHumidityTipPopup::set_humidity_level(int level)
|
void AmsHumidityTipPopup::set_humidity_level(int level)
|
||||||
{
|
{
|
||||||
current_humidity_level = level;
|
if (0 < current_humidity_level && current_humidity_level < 6)
|
||||||
if (current_humidity_level<= 0) {return;}
|
{
|
||||||
|
current_humidity_level = level;
|
||||||
std::string mode_string = wxGetApp().dark_mode()?"_dark":"_light";
|
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->SetBitmap(create_scaled_bitmap("hum_level" + std::to_string(current_humidity_level) + mode_string, this, 132));
|
curr_humidity_img->Refresh();
|
||||||
curr_humidity_img->Refresh();
|
curr_humidity_img->Update();
|
||||||
curr_humidity_img->Update();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AmsHumidityTipPopup::msw_rescale()
|
void AmsHumidityTipPopup::msw_rescale()
|
||||||
@@ -1842,8 +1842,11 @@ void AmsHumidityTipPopup::msw_rescale()
|
|||||||
close_img.msw_rescale();
|
close_img.msw_rescale();
|
||||||
|
|
||||||
// current humidity level image
|
// current humidity level image
|
||||||
std::string mode_string = wxGetApp().dark_mode() ? "_dark" : "_light";
|
if (0 < current_humidity_level && current_humidity_level < 6)
|
||||||
curr_humidity_img->SetBitmap(create_scaled_bitmap("hum_level" + std::to_string(current_humidity_level) + mode_string, this, 132));
|
{
|
||||||
|
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
|
// the list
|
||||||
humidity_level_list->msw_rescale();
|
humidity_level_list->msw_rescale();
|
||||||
|
|||||||
Reference in New Issue
Block a user