FIX: fix some size error on dpi changed
jira: TUDIO-10053 Change-Id: Icd93aa0dd9a2c693d7b957f9ede5c6dafc415352
This commit is contained in:
parent
b1fa2421c0
commit
ce65273dc0
|
@ -1353,6 +1353,7 @@ void AMSMaterialsSetting::on_dpi_changed(const wxRect &suggested_rect)
|
||||||
{
|
{
|
||||||
m_input_nozzle_max->GetTextCtrl()->SetSize(wxSize(-1, FromDIP(20)));
|
m_input_nozzle_max->GetTextCtrl()->SetSize(wxSize(-1, FromDIP(20)));
|
||||||
m_input_nozzle_min->GetTextCtrl()->SetSize(wxSize(-1, FromDIP(20)));
|
m_input_nozzle_min->GetTextCtrl()->SetSize(wxSize(-1, FromDIP(20)));
|
||||||
|
m_input_k_val->GetTextCtrl()->SetSize(wxSize(-1, FromDIP(20)));
|
||||||
//m_clr_picker->msw_rescale();
|
//m_clr_picker->msw_rescale();
|
||||||
degree->msw_rescale();
|
degree->msw_rescale();
|
||||||
bitmap_max_degree->SetBitmap(degree->bmp());
|
bitmap_max_degree->SetBitmap(degree->bmp());
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
|
|
||||||
#define CALIBRATION_LABEL_SIZE wxSize(FromDIP(150), FromDIP(24))
|
#define CALIBRATION_LABEL_SIZE wxSize(FromDIP(150), FromDIP(24))
|
||||||
#define SYNC_BUTTON_SIZE (wxSize(FromDIP(50), FromDIP(50)))
|
#define SYNC_BUTTON_SIZE (wxSize(FromDIP(50), FromDIP(50)))
|
||||||
|
#define CALIBRATION_TEXT_INPUT_Y_SIZE FromDIP(20)
|
||||||
|
|
||||||
#define LEFT_EXTRUDER_ID 1
|
#define LEFT_EXTRUDER_ID 1
|
||||||
#define RIGHT_EXTRUDER_ID 0
|
#define RIGHT_EXTRUDER_ID 0
|
||||||
|
@ -33,6 +34,11 @@ CaliPresetCaliStagePanel::CaliPresetCaliStagePanel(
|
||||||
m_top_sizer->Fit(this);
|
m_top_sizer->Fit(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CaliPresetCaliStagePanel::msw_rescale()
|
||||||
|
{
|
||||||
|
flow_ratio_input->GetTextCtrl()->SetSize(wxSize(-1, CALIBRATION_TEXT_INPUT_Y_SIZE));
|
||||||
|
}
|
||||||
|
|
||||||
void CaliPresetCaliStagePanel::create_panel(wxWindow* parent)
|
void CaliPresetCaliStagePanel::create_panel(wxWindow* parent)
|
||||||
{
|
{
|
||||||
auto title = new Label(parent, _L("Calibration Type"));
|
auto title = new Label(parent, _L("Calibration Type"));
|
||||||
|
@ -274,6 +280,12 @@ CaliPresetCustomRangePanel::CaliPresetCustomRangePanel(
|
||||||
m_top_sizer->Fit(this);
|
m_top_sizer->Fit(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void CaliPresetCustomRangePanel::msw_rescale()
|
||||||
|
{
|
||||||
|
for (TextInput *value_input : m_value_inputs)
|
||||||
|
value_input->GetTextCtrl()->SetSize(wxSize(-1, CALIBRATION_TEXT_INPUT_Y_SIZE));
|
||||||
|
}
|
||||||
|
|
||||||
void CaliPresetCustomRangePanel::set_unit(wxString unit)
|
void CaliPresetCustomRangePanel::set_unit(wxString unit)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < m_input_value_nums; ++i) {
|
for (size_t i = 0; i < m_input_value_nums; ++i) {
|
||||||
|
@ -512,6 +524,16 @@ void CalibrationPresetPage::msw_rescale()
|
||||||
for (auto& comboBox : m_filament_comboBox_list) {
|
for (auto& comboBox : m_filament_comboBox_list) {
|
||||||
comboBox->msw_rescale();
|
comboBox->msw_rescale();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (AMSPreview *ams_item : m_main_ams_preview_list)
|
||||||
|
ams_item->msw_rescale();
|
||||||
|
for (AMSPreview *ams_item : m_deputy_ams_preview_list)
|
||||||
|
ams_item->msw_rescale();
|
||||||
|
for (AMSPreview *ams_item : m_ams_preview_list)
|
||||||
|
ams_item->msw_rescale();
|
||||||
|
|
||||||
|
m_cali_stage_panel->msw_rescale();
|
||||||
|
m_custom_range_panel->msw_rescale();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CalibrationPresetPage::on_sys_color_changed()
|
void CalibrationPresetPage::on_sys_color_changed()
|
||||||
|
|
|
@ -28,6 +28,8 @@ public:
|
||||||
long style = wxTAB_TRAVERSAL);
|
long style = wxTAB_TRAVERSAL);
|
||||||
void create_panel(wxWindow* parent);
|
void create_panel(wxWindow* parent);
|
||||||
|
|
||||||
|
void msw_rescale();
|
||||||
|
|
||||||
void set_cali_stage(CaliPresetStage stage, float value);
|
void set_cali_stage(CaliPresetStage stage, float value);
|
||||||
void get_cali_stage(CaliPresetStage& stage, float& value);
|
void get_cali_stage(CaliPresetStage& stage, float& value);
|
||||||
|
|
||||||
|
@ -121,6 +123,8 @@ public:
|
||||||
|
|
||||||
void create_panel(wxWindow* parent);
|
void create_panel(wxWindow* parent);
|
||||||
|
|
||||||
|
void msw_rescale();
|
||||||
|
|
||||||
void set_unit(wxString unit);
|
void set_unit(wxString unit);
|
||||||
void set_titles(wxArrayString titles);
|
void set_titles(wxArrayString titles);
|
||||||
void set_values(wxArrayString values);
|
void set_values(wxArrayString values);
|
||||||
|
|
Loading…
Reference in New Issue