Skip to content

Commit

Permalink
Parameter box improvements (#5119)
Browse files Browse the repository at this point in the history
* Parameter improvements

• Added "Layers" side text for
	Bottom shell layers
	Number of slow layers
	Top shell layers
• Added "Layer" side text for
	Full fan speed at layer
• Added "x" side text for ratios. This one looks nice imo
	Internal bridge flow ratio
	Bridge flow ratio
	Top surface flow ratio
	Bottom surface flow ratio
	Flow ratio
	Scarf joint flow ratio
• Added "mm" side text for
	Mesh margin
	Minimum wall length
• Added "°C" side text for
	Softening temperature
• Converted these to spin boxes. Currently it combines combo box and input box and it has weird usage. Using spin boxes better because other layer related input boxes uses this too
	Top interface layers
	Bottom interface layers

* Fix for combo boxes without arrows

* Add icon files for Point input boxes

* Add side text for Point controls

* Update width of point controls

* Use TextInput for PointCtrl

* Use TextInput for PointCtrl

* Update style of Point Control

* Better Background color for Disabled elements on dark mode

* Use same color for disabled text on combo boxes

* Use Slightly darker text color for disabled text elements

* Revert changes for Top / Bottom interface layers parameter boxes

* fix build error

* update point control icons

* Remove "x" side text from flow ratio related parameters

* revert color related fixes

---------

Co-authored-by: SoftFever <[email protected]>
  • Loading branch information
yw4z and SoftFever authored May 29, 2024
1 parent c47e465 commit c14ae13
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 57 deletions.
1 change: 1 addition & 0 deletions resources/images/inputbox_x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions resources/images/inputbox_y.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 10 additions & 1 deletion src/libslic3r/PrintConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -816,6 +816,7 @@ void PrintConfigDef::init_fff_params()
def = this->add("bottom_shell_layers", coInt);
def->label = L("Bottom shell layers");
def->category = L("Strength");
def->sidetext = L("layers"); // ORCA add side text
def->tooltip = L("This is the number of solid layers of bottom shell, including the bottom "
"surface layer. When the thickness calculated by this value is thinner "
"than bottom shell thickness, the bottom shell layers will be increased");
Expand Down Expand Up @@ -1619,6 +1620,7 @@ void PrintConfigDef::init_fff_params()
"set appropriately. OrcaSlicer ensures that adaptive_bed_mesh_min/adaptive_bed_mesh_max values do not exceed these min/max "
"points. This information can usually be obtained from your printer manufacturer. The default setting is (-99999, -99999), which "
"means there are no limits, thus allowing probing across the entire bed.");
def->sidetext = L("mm");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionPoint(Vec2d(-99999, -99999)));

Expand All @@ -1630,6 +1632,7 @@ void PrintConfigDef::init_fff_params()
"set appropriately. OrcaSlicer ensures that adaptive_bed_mesh_min/adaptive_bed_mesh_max values do not exceed these min/max "
"points. This information can usually be obtained from your printer manufacturer. The default setting is (99999, 99999), which "
"means there are no limits, thus allowing probing across the entire bed.");
def->sidetext = L("mm");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionPoint(Vec2d(99999, 99999)));

Expand All @@ -1638,12 +1641,14 @@ void PrintConfigDef::init_fff_params()
def->tooltip = L("This option sets the preferred distance between probe points (grid size) for the X and Y directions, with the "
"default being 50mm for both X and Y.");
def->min = 0;
def->sidetext = L("mm");
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionPoint(Vec2d(50, 50)));

def = this->add("adaptive_bed_mesh_margin", coFloat);
def->label = L("Mesh margin");
def->tooltip = L("This option determines the additional distance by which the adaptive bed mesh area should be expanded in the XY directions.");
def->sidetext = L("mm"); // ORCA add side text
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionFloat(0));

Expand Down Expand Up @@ -1982,6 +1987,7 @@ def = this->add("filament_loading_speed", coFloats);
def = this->add("temperature_vitrification", coInts);
def->label = L("Softening temperature");
def->tooltip = L("The material softens at this temperature, so when the bed temperature is equal to or greater than it, it's highly recommended to open the front door and/or remove the upper glass to avoid cloggings.");
def->sidetext = L("°C"); // ORCA add side text
def->mode = comSimple;
def->set_default_value(new ConfigOptionInts{ 100 });

Expand Down Expand Up @@ -2344,6 +2350,7 @@ def = this->add("filament_loading_speed", coFloats);
def->tooltip = L("The first few layers are printed slower than normal. "
"The speed is gradually increased in a linear fashion over the specified number of layers.");
def->category = L("Speed");
def->sidetext = L("layers"); // ORCA add side text
def->min = 0;
def->mode = comAdvanced;
def->set_default_value(new ConfigOptionInt(0));
Expand All @@ -2363,6 +2370,7 @@ def = this->add("filament_loading_speed", coFloats);
"to maximum at layer \"full_fan_speed_layer\". "
"\"full_fan_speed_layer\" will be ignored if lower than \"close_fan_the_first_x_layers\", in which case "
"the fan will be running at maximum allowed speed at layer \"close_fan_the_first_x_layers\" + 1.");
def->sidetext = L("layer"); // ORCA add side text
def->min = 0;
def->max = 1000;
def->mode = comAdvanced;
Expand Down Expand Up @@ -4637,6 +4645,7 @@ def = this->add("filament_loading_speed", coFloats);
def = this->add("top_shell_layers", coInt);
def->label = L("Top shell layers");
def->category = L("Strength");
def->sidetext = L("layers"); // ORCA add side text
def->tooltip = L("This is the number of solid layers of top shell, including the top "
"surface layer. When the thickness calculated by this value is thinner "
"than top shell thickness, the top shell layers will be increased");
Expand Down Expand Up @@ -5013,7 +5022,7 @@ def = this->add("filament_loading_speed", coFloats);
"NOTE: Bottom and top surfaces will not be affected by this value to prevent visual gaps on the ouside of the model. "
"Adjust 'One wall threshold' in the Advanced settings below to adjust the sensitivity of what is considered a top-surface. "
"'One wall threshold' is only visibile if this setting is set above the default value of 0.5, or if single-wall top surfaces is enabled.");
def->sidetext = "";
def->sidetext = L("mm"); // ORCA add side text
def->mode = comAdvanced;
def->min = 0.0;
def->max = 25.0;
Expand Down
2 changes: 2 additions & 0 deletions src/slic3r/GUI/BedShapeDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ void BedShape::append_option_line(ConfigOptionsGroupShp optgroup, Parameter para
def.set_default_value(new ConfigOptionPoints{ Vec2d(200, 200) });
def.min = 0;
def.max = 214700;
def.width = 7;
def.label = get_option_label(param);
def.tooltip = L("Size in X and Y of the rectangular plate.");
key = "rect_size";
Expand All @@ -54,6 +55,7 @@ void BedShape::append_option_line(ConfigOptionsGroupShp optgroup, Parameter para
def.set_default_value(new ConfigOptionPoints{ Vec2d(0, 0) });
def.min = -107350;
def.max = 107350;
def.width = 7;
def.label = get_option_label(param);
def.tooltip = L("Distance of the 0,0 G-code coordinate from the front left corner of the rectangle.");
key = "rect_origin";
Expand Down
36 changes: 12 additions & 24 deletions src/slic3r/GUI/CreatePresetsDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
#define FILAMENT_LIST_SIZE wxSize(FromDIP(560), FromDIP(100))
#define FILAMENT_OPTION_SIZE wxSize(FromDIP(-1), FromDIP(30))
#define PRESET_TEMPLATE_SIZE wxSize(FromDIP(-1), FromDIP(100))
#define PRINTER_SPACE_SIZE wxSize(FromDIP(80), FromDIP(24))
#define PRINTER_SPACE_SIZE wxSize(FromDIP(100), FromDIP(24)) // ORCA Match size with other components
#define ORIGIN_TEXT_SIZE wxSize(FromDIP(10), FromDIP(24))
#define PRINTER_PRESET_VENDOR_SIZE wxSize(FromDIP(150), FromDIP(24))
#define PRINTER_PRESET_MODEL_SIZE wxSize(FromDIP(280), FromDIP(24))
Expand Down Expand Up @@ -1793,26 +1793,20 @@ wxBoxSizer *CreatePrinterPresetDialog::create_bed_size_item(wxWindow *parent)
horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(10));

wxBoxSizer * length_sizer = new wxBoxSizer(wxVERTICAL);
wxStaticText *static_length_text = new wxStaticText(parent, wxID_ANY, _L("X"), wxDefaultPosition, wxDefaultSize);
static_length_text->SetMinSize(ORIGIN_TEXT_SIZE);
static_length_text->SetSize(ORIGIN_TEXT_SIZE);
length_sizer->Add(static_length_text, 0, wxEXPAND | wxALL, 0);
// ORCA use icon on input box to match style with other Point fields
horizontal_sizer->Add(length_sizer, 0, wxEXPAND | wxLEFT | wxTOP | wxALIGN_CENTER_VERTICAL, FromDIP(10));
wxBoxSizer *length_input_sizer = new wxBoxSizer(wxVERTICAL);
m_bed_size_x_input = new TextInput(parent, "200", "mm", wxEmptyString, wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_CENTRE | wxTE_PROCESS_ENTER);
m_bed_size_x_input = new TextInput(parent, "200", "mm", "inputbox_x", wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_PROCESS_ENTER);
wxTextValidator validator(wxFILTER_DIGITS);
m_bed_size_x_input->GetTextCtrl()->SetValidator(validator);
length_input_sizer->Add(m_bed_size_x_input, 0, wxEXPAND | wxALL, 0);
length_input_sizer->Add(m_bed_size_x_input, 0, wxEXPAND | wxLEFT, FromDIP(5));
horizontal_sizer->Add(length_input_sizer, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(5));

wxBoxSizer * width_sizer = new wxBoxSizer(wxVERTICAL);
wxStaticText *static_width_text = new wxStaticText(parent, wxID_ANY, _L("Y"), wxDefaultPosition, wxDefaultSize);
static_width_text->SetMinSize(ORIGIN_TEXT_SIZE);
static_width_text->SetSize(ORIGIN_TEXT_SIZE);
width_sizer->Add(static_width_text, 0, wxEXPAND | wxALL, 0);
// ORCA use icon on input box to match style with other Point fields
horizontal_sizer->Add(width_sizer, 0, wxEXPAND | wxLEFT | wxTOP | wxALIGN_CENTER_VERTICAL, FromDIP(10));
wxBoxSizer *width_input_sizer = new wxBoxSizer(wxVERTICAL);
m_bed_size_y_input = new TextInput(parent, "200", "mm", wxEmptyString, wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_CENTRE | wxTE_PROCESS_ENTER);
m_bed_size_y_input = new TextInput(parent, "200", "mm", "inputbox_y", wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_PROCESS_ENTER);
m_bed_size_y_input->GetTextCtrl()->SetValidator(validator);
width_input_sizer->Add(m_bed_size_y_input, 0, wxEXPAND | wxALL, 0);
horizontal_sizer->Add(width_input_sizer, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(5));
Expand All @@ -1832,26 +1826,20 @@ wxBoxSizer *CreatePrinterPresetDialog::create_origin_item(wxWindow *parent)
horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(10));

wxBoxSizer * length_sizer = new wxBoxSizer(wxVERTICAL);
wxStaticText *static_origin_x_text = new wxStaticText(parent, wxID_ANY, _L("X"), wxDefaultPosition, wxDefaultSize);
static_origin_x_text->SetMinSize(ORIGIN_TEXT_SIZE);
static_origin_x_text->SetSize(ORIGIN_TEXT_SIZE);
length_sizer->Add(static_origin_x_text, 0, wxEXPAND | wxALL, 0);
// ORCA use icon on input box to match style with other Point fields
horizontal_sizer->Add(length_sizer, 0, wxEXPAND | wxLEFT | wxTOP | wxALIGN_CENTER_VERTICAL, FromDIP(10));
wxBoxSizer *length_input_sizer = new wxBoxSizer(wxVERTICAL);
m_bed_origin_x_input = new TextInput(parent, "0", "mm", wxEmptyString, wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_CENTRE | wxTE_PROCESS_ENTER);
m_bed_origin_x_input = new TextInput(parent, "0", "mm", "inputbox_x", wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_PROCESS_ENTER);
wxTextValidator validator(wxFILTER_DIGITS);
m_bed_origin_x_input->GetTextCtrl()->SetValidator(validator);
length_input_sizer->Add(m_bed_origin_x_input, 0, wxEXPAND | wxALL, 0);
length_input_sizer->Add(m_bed_origin_x_input, 0, wxEXPAND | wxLEFT, FromDIP(5)); // Align with other
horizontal_sizer->Add(length_input_sizer, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(5));

wxBoxSizer * width_sizer = new wxBoxSizer(wxVERTICAL);
wxStaticText *static_origin_y_text = new wxStaticText(parent, wxID_ANY, _L("Y"), wxDefaultPosition, wxDefaultSize);
static_origin_y_text->SetMinSize(ORIGIN_TEXT_SIZE);
static_origin_y_text->SetSize(ORIGIN_TEXT_SIZE);
width_sizer->Add(static_origin_y_text, 0, wxEXPAND | wxALL, 0);
// ORCA use icon on input box to match style with other Point fields
horizontal_sizer->Add(width_sizer, 0, wxEXPAND | wxLEFT | wxTOP | wxALIGN_CENTER_VERTICAL, FromDIP(10));
wxBoxSizer *width_input_sizer = new wxBoxSizer(wxVERTICAL);
m_bed_origin_y_input = new TextInput(parent, "0", "mm", wxEmptyString, wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_CENTRE | wxTE_PROCESS_ENTER);
m_bed_origin_y_input = new TextInput(parent, "0", "mm", "inputbox_y", wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_PROCESS_ENTER);
m_bed_origin_y_input->GetTextCtrl()->SetValidator(validator);
width_input_sizer->Add(m_bed_origin_y_input, 0, wxEXPAND | wxALL, 0);
horizontal_sizer->Add(width_input_sizer, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(5));
Expand Down Expand Up @@ -1944,7 +1932,7 @@ wxBoxSizer *CreatePrinterPresetDialog::create_max_print_height_item(wxWindow *pa
horizontal_sizer->Add(optionSizer, 0, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, FromDIP(10));

wxBoxSizer *hight_input_sizer = new wxBoxSizer(wxVERTICAL);
m_print_height_input = new TextInput(parent, "200", "mm", wxEmptyString, wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_CENTRE | wxTE_PROCESS_ENTER);
m_print_height_input = new TextInput(parent, "200", "mm", wxEmptyString, wxDefaultPosition, PRINTER_SPACE_SIZE, wxTE_PROCESS_ENTER); // Use same alignment with all other input boxes
wxTextValidator validator(wxFILTER_DIGITS);
m_print_height_input->GetTextCtrl()->SetValidator(validator);
hight_input_sizer->Add(m_print_height_input, 0, wxEXPAND | wxLEFT, FromDIP(5));
Expand Down
64 changes: 35 additions & 29 deletions src/slic3r/GUI/Field.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1737,8 +1737,10 @@ void ColourPicker::save_colors_to_config() {
void PointCtrl::BUILD()
{
auto temp = new wxBoxSizer(wxHORIZONTAL);
m_combine_side_text = true; // Prefer using side text in input box

const wxSize field_size(4 * m_em_unit, -1);
//const wxSize field_size(4 * m_em_unit, -1);
const wxSize field_size((m_opt.width >= 0 ? m_opt.width : def_width_wider()) * m_em_unit, -1); // ORCA match width with other components
Slic3r::Vec2d default_pt;
if(m_opt.type == coPoints)
default_pt = m_opt.get_default_value<ConfigOptionPoints>()->values.at(0);
Expand All @@ -1750,35 +1752,38 @@ void PointCtrl::BUILD()
wxString Y = val - int(val) == 0 ? wxString::Format(_T("%i"), int(val)) : wxNumberFormatter::ToString(val, 2, wxNumberFormatter::Style_None);

long style = wxTE_PROCESS_ENTER;
#ifdef _WIN32
style |= wxBORDER_SIMPLE;
#endif
x_textctrl = new ::TextCtrl(m_parent, wxID_ANY, X, wxDefaultPosition, field_size, style);
y_textctrl = new ::TextCtrl(m_parent, wxID_ANY, Y, wxDefaultPosition, field_size, style);
//#ifdef _WIN32
// style |= wxBORDER_SIMPLE;
//#endif
// ORCA add icons to point control boxes instead of using text for X / Y
x_input = new ::TextInput(m_parent, X, m_opt.sidetext, "inputbox_x", wxDefaultPosition, field_size, style);
y_input = new ::TextInput(m_parent, Y, m_opt.sidetext, "inputbox_y", wxDefaultPosition, field_size, style);
x_textctrl = x_input->GetTextCtrl();
y_textctrl = y_input->GetTextCtrl();
if (parent_is_custom_ctrl && m_opt.height < 0)
opt_height = (double)x_textctrl->GetSize().GetHeight() / m_em_unit;

x_textctrl->SetFont(Slic3r::GUI::wxGetApp().normal_font());
x_textctrl->SetBackgroundStyle(wxBG_STYLE_PAINT);
y_textctrl->SetFont(Slic3r::GUI::wxGetApp().normal_font());
y_textctrl->SetBackgroundStyle(wxBG_STYLE_PAINT);
x_input->SetFont(Slic3r::GUI::wxGetApp().normal_font());
x_input->SetBackgroundStyle(wxBG_STYLE_PAINT);
y_input->SetFont(Slic3r::GUI::wxGetApp().normal_font());
y_input->SetBackgroundStyle(wxBG_STYLE_PAINT);

auto static_text_x = new wxStaticText(m_parent, wxID_ANY, "x : ");
auto static_text_y = new wxStaticText(m_parent, wxID_ANY, " y : ");
static_text_x->SetFont(Slic3r::GUI::wxGetApp().normal_font());
static_text_x->SetBackgroundStyle(wxBG_STYLE_PAINT);
static_text_y->SetFont(Slic3r::GUI::wxGetApp().normal_font());
static_text_y->SetBackgroundStyle(wxBG_STYLE_PAINT);
//auto static_text_x = new wxStaticText(m_parent, wxID_ANY, "x : ");
//auto static_text_y = new wxStaticText(m_parent, wxID_ANY, " y : ");
//static_text_x->SetFont(Slic3r::GUI::wxGetApp().normal_font());
//static_text_x->SetBackgroundStyle(wxBG_STYLE_PAINT);
//static_text_y->SetFont(Slic3r::GUI::wxGetApp().normal_font());
//static_text_y->SetBackgroundStyle(wxBG_STYLE_PAINT);

wxGetApp().UpdateDarkUI(x_textctrl);
wxGetApp().UpdateDarkUI(y_textctrl);
wxGetApp().UpdateDarkUI(static_text_x, false, true);
wxGetApp().UpdateDarkUI(static_text_y, false, true);
wxGetApp().UpdateDarkUI(x_input);
wxGetApp().UpdateDarkUI(y_input);
//wxGetApp().UpdateDarkUI(static_text_x, false, true);
//wxGetApp().UpdateDarkUI(static_text_y, false, true);

temp->Add(static_text_x, 0, wxALIGN_CENTER_VERTICAL, 0);
temp->Add(x_textctrl);
temp->Add(static_text_y, 0, wxALIGN_CENTER_VERTICAL, 0);
temp->Add(y_textctrl);
//temp->Add(static_text_x, 0, wxALIGN_CENTER_VERTICAL, 0);
temp->Add(x_input);
//temp->Add(static_text_y, 0, wxALIGN_CENTER_VERTICAL, 0);
temp->Add(y_input);

x_textctrl->Bind(wxEVT_TEXT_ENTER, ([this](wxCommandEvent e) { propagate_value(x_textctrl); }), x_textctrl->GetId());
y_textctrl->Bind(wxEVT_TEXT_ENTER, ([this](wxCommandEvent e) { propagate_value(y_textctrl); }), y_textctrl->GetId());
Expand All @@ -1797,16 +1802,17 @@ void PointCtrl::msw_rescale()
{
Field::msw_rescale();

wxSize field_size(4 * m_em_unit, -1);
//wxSize field_size(4 * m_em_unit, -1);
wxSize field_size((m_opt.width >= 0 ? m_opt.width : def_width_wider()) * m_em_unit, -1); // ORCA match width with other components

if (parent_is_custom_ctrl) {
field_size.SetHeight(lround(opt_height * m_em_unit));
x_textctrl->SetSize(field_size);
y_textctrl->SetSize(field_size);
x_input->SetSize(field_size);
y_input->SetSize(field_size);
}
else {
x_textctrl->SetMinSize(field_size);
y_textctrl->SetMinSize(field_size);
x_input->SetMinSize(field_size);
y_input->SetMinSize(field_size);
}
}

Expand Down
3 changes: 3 additions & 0 deletions src/slic3r/GUI/Field.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#include "GUI.hpp"
#include "wxExtensions.hpp"
#include "Widgets/SpinInput.hpp"
#include "Widgets/TextInput.hpp"

#ifdef __WXMSW__
#define wxMSW true
Expand Down Expand Up @@ -502,6 +503,8 @@ class PointCtrl : public Field {
wxSizer* sizer{ nullptr };
wxTextCtrl* x_textctrl{ nullptr };
wxTextCtrl* y_textctrl{ nullptr };
TextInput* x_input{nullptr};
TextInput* y_input{nullptr};

void BUILD() override;
bool value_was_changed(wxTextCtrl* win);
Expand Down
7 changes: 4 additions & 3 deletions src/slic3r/GUI/Widgets/ComboBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ ComboBox::ComboBox(wxWindow *parent,
TextInput::SetBackgroundColor(StateColor(std::make_pair(0xF0F0F1, (int) StateColor::Disabled),
std::make_pair(0xE5F0EE, (int) StateColor::Focused), // ORCA updated background color for focused item
std::make_pair(*wxWHITE, (int) StateColor::Normal)));
TextInput::SetLabelColor(StateColor(std::make_pair(0x909090, (int) StateColor::Disabled),
TextInput::SetLabelColor(StateColor(
std::make_pair(wxColour("#ACACAC"), (int) StateColor::Disabled), // ORCA: Use same color for disabled text on combo boxes
std::make_pair(0x262E30, (int) StateColor::Normal)));
}
if (auto scroll = GetScrollParent(this))
Expand Down Expand Up @@ -85,7 +86,7 @@ void ComboBox::SetSelection(int n)
drop.SetSelection(n);
SetLabel(drop.GetValue());
if (drop.selection >= 0 && drop.iconSize.y > 0)
SetIcon(icons[drop.selection]);
SetIcon(icons[drop.selection].IsNull() ? create_scaled_bitmap("drop_down", nullptr, 16): icons[drop.selection]); // ORCA fix combo boxes without arrows
}
void ComboBox::SelectAndNotify(int n) {
SetSelection(n);
Expand All @@ -108,7 +109,7 @@ void ComboBox::SetValue(const wxString &value)
drop.SetValue(value);
SetLabel(value);
if (drop.selection >= 0 && drop.iconSize.y > 0)
SetIcon(icons[drop.selection]);
SetIcon(icons[drop.selection].IsNull() ? create_scaled_bitmap("drop_down", nullptr, 16): icons[drop.selection]); // ORCA fix combo boxes without arrows
}

void ComboBox::SetLabel(const wxString &value)
Expand Down

0 comments on commit c14ae13

Please sign in to comment.