mirror of
https://github.com/godotengine/godot.git
synced 2025-12-08 06:09:55 +00:00
Merge pull request #102372 from Rindbee/display-the-actual-used-theme-items-in-the-Inspector
Display the actual used theme items in the Inspector
This commit is contained in:
commit
3bc2821e26
5 changed files with 76 additions and 11 deletions
|
|
@ -1326,7 +1326,7 @@ void EditorPropertyInteger::_value_changed(int64_t val) {
|
|||
}
|
||||
|
||||
void EditorPropertyInteger::update_property() {
|
||||
int64_t val = get_edited_property_value();
|
||||
int64_t val = get_edited_property_display_value();
|
||||
spin->set_value_no_signal(val);
|
||||
#ifdef DEBUG_ENABLED
|
||||
// If spin (currently EditorSplinSlider : Range) is changed so that it can use int64_t, then the below warning wouldn't be a problem.
|
||||
|
|
@ -2635,7 +2635,7 @@ void EditorPropertyColor::_notification(int p_what) {
|
|||
}
|
||||
|
||||
void EditorPropertyColor::update_property() {
|
||||
picker->set_pick_color(get_edited_property_value());
|
||||
picker->set_pick_color(get_edited_property_display_value());
|
||||
const Color color = picker->get_pick_color();
|
||||
|
||||
// Add a tooltip to display each channel's values without having to click the ColorPickerButton
|
||||
|
|
@ -3015,7 +3015,7 @@ void EditorPropertyResource::_resource_selected(const Ref<Resource> &p_resource,
|
|||
bool unfold = !get_edited_object()->editor_is_section_unfolded(get_edited_property());
|
||||
get_edited_object()->editor_set_section_unfold(get_edited_property(), unfold);
|
||||
update_property();
|
||||
} else {
|
||||
} else if (!is_checkable() || is_checked()) {
|
||||
emit_signal(SNAME("resource_selected"), get_edited_property(), p_resource);
|
||||
}
|
||||
}
|
||||
|
|
@ -3276,7 +3276,7 @@ void EditorPropertyResource::setup(Object *p_object, const String &p_path, const
|
|||
}
|
||||
|
||||
void EditorPropertyResource::update_property() {
|
||||
Ref<Resource> res = get_edited_property_value();
|
||||
Ref<Resource> res = get_edited_property_display_value();
|
||||
|
||||
if (use_sub_inspector) {
|
||||
if (res.is_valid() != resource_picker->is_toggle_mode()) {
|
||||
|
|
@ -3328,6 +3328,8 @@ void EditorPropertyResource::update_property() {
|
|||
}
|
||||
}
|
||||
|
||||
sub_inspector->set_read_only(is_checkable() && !is_checked());
|
||||
|
||||
if (res.ptr() != sub_inspector->get_edited_object()) {
|
||||
sub_inspector->edit(res.ptr());
|
||||
_update_property_bg();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue