Skip to content

Commit

Permalink
Fix ColorPicker shape icon is invisible until shape is changed
Browse files Browse the repository at this point in the history
  • Loading branch information
DinDotDout committed Nov 6, 2023
1 parent 4c96e96 commit 15ec132
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scene/gui/color_picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,10 @@ void ColorPicker::_notification(int p_what) {
shape_popup->set_item_icon(shape_popup->get_item_index(SHAPE_VHS_CIRCLE), theme_cache.shape_circle);
shape_popup->set_item_icon(shape_popup->get_item_index(SHAPE_OKHSL_CIRCLE), theme_cache.shape_circle);

if (current_shape != SHAPE_NONE) {
btn_shape->set_icon(shape_popup->get_item_icon(current_shape));
}

internal_margin->begin_bulk_theme_override();
internal_margin->add_theme_constant_override(SNAME("margin_bottom"), theme_cache.content_margin);
internal_margin->add_theme_constant_override(SNAME("margin_left"), theme_cache.content_margin);
Expand Down Expand Up @@ -1792,8 +1796,6 @@ ColorPicker::ColorPicker() {
shape_popup->set_item_checked(current_shape, true);
shape_popup->connect("id_pressed", callable_mp(this, &ColorPicker::set_picker_shape));

btn_shape->set_icon(shape_popup->get_item_icon(current_shape));

add_mode(new ColorModeRGB(this));
add_mode(new ColorModeHSV(this));
add_mode(new ColorModeRAW(this));
Expand Down

0 comments on commit 15ec132

Please sign in to comment.