mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-09-09 18:27:00 +00:00
ENH:update SyncAmsInfoDialog
jira: none Change-Id: I7549dd3334fd9bcc4eba5d3b41786516fd879f38 (cherry picked from commit 9b1717fa56b1d5baacc3801f23d1586050970574)
This commit is contained in:
@@ -124,14 +124,15 @@ void ComboBox::SetLabel(const wxString &value)
|
||||
else {
|
||||
if (is_replace_text_to_image) {
|
||||
auto new_value = value;
|
||||
new_value.Replace(replace_text, "", false);//replace first text
|
||||
TextInput::SetIcon_1(image_for_text);
|
||||
TextInput::SetLabel(new_value);
|
||||
}
|
||||
else {
|
||||
TextInput::SetIcon_1("");
|
||||
TextInput::SetLabel(value);
|
||||
if (new_value.starts_with(replace_text)) {
|
||||
new_value.Replace(replace_text, "", false); // replace first text
|
||||
TextInput::SetIcon_1(image_for_text);
|
||||
TextInput::SetLabel(new_value);
|
||||
return;
|
||||
}
|
||||
}
|
||||
TextInput::SetIcon_1("");
|
||||
TextInput::SetLabel(value);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -118,7 +118,7 @@ void TextInput::SetIcon_1(const wxString &icon) {
|
||||
this->icon_1 = ScalableBitmap();
|
||||
return;
|
||||
}
|
||||
this->icon_1 = ScalableBitmap(this, icon.ToStdString(), 16);
|
||||
this->icon_1 = ScalableBitmap(this, icon.ToStdString(), 14);
|
||||
Rescale();
|
||||
}
|
||||
|
||||
@@ -238,6 +238,7 @@ void TextInput::render(wxDC& dc)
|
||||
if (pt.x * 2 + szIcon.x + 0 + labelSize.x < size.x)
|
||||
pt.x = (size.x - (szIcon.x + 0 + labelSize.x)) / 2;
|
||||
}
|
||||
pt.x += szIcon.x / 4.f;
|
||||
dc.DrawBitmap(icon_1.bmp(), pt);
|
||||
pt.x += szIcon.x + 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user