Custom controls : The width for full_width fields is updated according to the custom control width

(thanks to the @supermerill for the mention on it, 6acf6bdf21)

+ Deleted redundant background color, as mentioned in the #5062
This commit is contained in:
YuSanka 2020-11-12 10:13:16 +01:00
parent 28b4ad92ea
commit 4eded76136
2 changed files with 5 additions and 18 deletions

View file

@ -296,11 +296,7 @@ void OptionsGroup::activate_line(Line& line)
const auto& option = option_set.front();
const auto& field = build_field(option);
if (custom_ctrl) {
if (is_window_field(field) && option.opt.full_width)
field->getWindow()->SetSize(wxSize(3 * Field::def_width_wider() * wxGetApp().em_unit(), -1));
}
else {
if (!custom_ctrl) {
if (is_window_field(field))
sizer->Add(field->getWindow(), option.opt.full_width ? 1 : 0,
wxBOTTOM | wxTOP | (option.opt.full_width ? wxEXPAND : wxALIGN_CENTER_VERTICAL), (wxOSX || !staticbox) ? 0 : 2);