@@ -211,7 +211,13 @@ void CodeEdit::_notification(int p_what) {
211
211
tl->set_horizontal_alignment (HORIZONTAL_ALIGNMENT_RIGHT);
212
212
} else {
213
213
if (code_completion_options[l].default_value .get_type () == Variant::COLOR) {
214
- draw_rect (Rect2 (Point2 (code_completion_rect.position .x + code_completion_rect.size .width - icon_area_size.x , icon_area.position .y ), icon_area_size), (Color)code_completion_options[l].default_value );
214
+ const Color color = code_completion_options[l].default_value ;
215
+ const Rect2 rect = Rect2 (Point2 (code_completion_rect.position .x + code_completion_rect.size .width - icon_area_size.x , icon_area.position .y ), icon_area_size);
216
+ if (color.a < 1.0 ) {
217
+ draw_texture_rect (theme_cache.completion_color_bg , rect, true );
218
+ }
219
+
220
+ draw_rect (rect, color);
215
221
}
216
222
tl->set_horizontal_alignment (HORIZONTAL_ALIGNMENT_LEFT);
217
223
}
@@ -2771,6 +2777,7 @@ void CodeEdit::_bind_methods() {
2771
2777
BIND_THEME_ITEM_CUSTOM (Theme::DATA_TYPE_ICON, CodeEdit, can_fold_code_region_icon, " can_fold_code_region" );
2772
2778
BIND_THEME_ITEM_CUSTOM (Theme::DATA_TYPE_ICON, CodeEdit, folded_code_region_icon, " folded_code_region" );
2773
2779
BIND_THEME_ITEM (Theme::DATA_TYPE_ICON, CodeEdit, folded_eol_icon);
2780
+ BIND_THEME_ITEM (Theme::DATA_TYPE_ICON, CodeEdit, completion_color_bg);
2774
2781
2775
2782
BIND_THEME_ITEM (Theme::DATA_TYPE_COLOR, CodeEdit, breakpoint_color);
2776
2783
BIND_THEME_ITEM_CUSTOM (Theme::DATA_TYPE_ICON, CodeEdit, breakpoint_icon, " breakpoint" );
0 commit comments