mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Add disabled theme icons for CheckBox
(cherry picked from commit 3a40c268a6)
This commit is contained in:
parent
cc419fcf8f
commit
44e84c61a6
8 changed files with 32 additions and 2 deletions
|
|
@ -34,7 +34,9 @@
|
|||
|
||||
Size2 CheckBox::get_icon_size() const {
|
||||
Ref<Texture> checked = Control::get_icon("checked");
|
||||
Ref<Texture> checked_disabled = Control::get_icon("checked_disabled");
|
||||
Ref<Texture> unchecked = Control::get_icon("unchecked");
|
||||
Ref<Texture> unchecked_disabled = Control::get_icon("unchecked_disabled");
|
||||
Ref<Texture> radio_checked = Control::get_icon("radio_checked");
|
||||
Ref<Texture> radio_unchecked = Control::get_icon("radio_unchecked");
|
||||
|
||||
|
|
@ -73,8 +75,8 @@ void CheckBox::_notification(int p_what) {
|
|||
|
||||
RID ci = get_canvas_item();
|
||||
|
||||
Ref<Texture> on = Control::get_icon(is_radio() ? "radio_checked" : "checked");
|
||||
Ref<Texture> off = Control::get_icon(is_radio() ? "radio_unchecked" : "unchecked");
|
||||
Ref<Texture> on = Control::get_icon(vformat("%s%s", is_radio() ? "radio_checked" : "checked", is_disabled() ? "_disabled" : ""));
|
||||
Ref<Texture> off = Control::get_icon(vformat("%s%s", is_radio() ? "radio_unchecked" : "unchecked", is_disabled() ? "_disabled" : ""));
|
||||
Ref<StyleBox> sb = get_stylebox("normal");
|
||||
|
||||
Vector2 ofs;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue