Merge pull request #98039 from aaronfranke/button-icon
Rename internal Button `*_icon` functions to `*_button_icon` to match exposed methods
This commit is contained in:
commit
696ca9db3c
129 changed files with 718 additions and 718 deletions
|
|
@ -417,18 +417,18 @@ void EditorDebuggerNode::_update_errors() {
|
|||
if (error_count == 0 && warning_count == 0) {
|
||||
debugger_button->set_text(TTR("Debugger"));
|
||||
debugger_button->remove_theme_color_override(SceneStringName(font_color));
|
||||
debugger_button->set_icon(Ref<Texture2D>());
|
||||
debugger_button->set_button_icon(Ref<Texture2D>());
|
||||
} else {
|
||||
debugger_button->set_text(TTR("Debugger") + " (" + itos(error_count + warning_count) + ")");
|
||||
if (error_count >= 1 && warning_count >= 1) {
|
||||
debugger_button->set_icon(get_editor_theme_icon(SNAME("ErrorWarning")));
|
||||
debugger_button->set_button_icon(get_editor_theme_icon(SNAME("ErrorWarning")));
|
||||
// Use error color to represent the highest level of severity reported.
|
||||
debugger_button->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||
} else if (error_count >= 1) {
|
||||
debugger_button->set_icon(get_editor_theme_icon(SNAME("Error")));
|
||||
debugger_button->set_button_icon(get_editor_theme_icon(SNAME("Error")));
|
||||
debugger_button->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||
} else {
|
||||
debugger_button->set_icon(get_editor_theme_icon(SNAME("Warning")));
|
||||
debugger_button->set_button_icon(get_editor_theme_icon(SNAME("Warning")));
|
||||
debugger_button->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("warning_color"), EditorStringName(Editor)));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -390,10 +390,10 @@ void EditorProfiler::_update_frame() {
|
|||
|
||||
void EditorProfiler::_update_button_text() {
|
||||
if (activate->is_pressed()) {
|
||||
activate->set_icon(get_editor_theme_icon(SNAME("Stop")));
|
||||
activate->set_button_icon(get_editor_theme_icon(SNAME("Stop")));
|
||||
activate->set_text(TTR("Stop"));
|
||||
} else {
|
||||
activate->set_icon(get_editor_theme_icon(SNAME("Play")));
|
||||
activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
|
||||
activate->set_text(TTR("Start"));
|
||||
}
|
||||
}
|
||||
|
|
@ -428,8 +428,8 @@ void EditorProfiler::_notification(int p_what) {
|
|||
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
|
||||
case NOTIFICATION_THEME_CHANGED:
|
||||
case NOTIFICATION_TRANSLATION_CHANGED: {
|
||||
activate->set_icon(get_editor_theme_icon(SNAME("Play")));
|
||||
clear_button->set_icon(get_editor_theme_icon(SNAME("Clear")));
|
||||
activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
|
||||
clear_button->set_button_icon(get_editor_theme_icon(SNAME("Clear")));
|
||||
|
||||
theme_cache.seek_line_color = get_theme_color(SceneStringName(font_color), EditorStringName(Editor));
|
||||
theme_cache.seek_line_color.a = 0.8;
|
||||
|
|
|
|||
|
|
@ -411,12 +411,12 @@ void EditorVisualProfiler::_update_frame(bool p_focus_selected) {
|
|||
|
||||
void EditorVisualProfiler::_activate_pressed() {
|
||||
if (activate->is_pressed()) {
|
||||
activate->set_icon(get_editor_theme_icon(SNAME("Stop")));
|
||||
activate->set_button_icon(get_editor_theme_icon(SNAME("Stop")));
|
||||
activate->set_text(TTR("Stop"));
|
||||
_clear_pressed(); //always clear on start
|
||||
clear_button->set_disabled(false);
|
||||
} else {
|
||||
activate->set_icon(get_editor_theme_icon(SNAME("Play")));
|
||||
activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
|
||||
activate->set_text(TTR("Start"));
|
||||
}
|
||||
emit_signal(SNAME("enable_profiling"), activate->is_pressed());
|
||||
|
|
@ -438,8 +438,8 @@ void EditorVisualProfiler::_notification(int p_what) {
|
|||
case NOTIFICATION_LAYOUT_DIRECTION_CHANGED:
|
||||
case NOTIFICATION_THEME_CHANGED:
|
||||
case NOTIFICATION_TRANSLATION_CHANGED: {
|
||||
activate->set_icon(get_editor_theme_icon(SNAME("Play")));
|
||||
clear_button->set_icon(get_editor_theme_icon(SNAME("Clear")));
|
||||
activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
|
||||
clear_button->set_button_icon(get_editor_theme_icon(SNAME("Clear")));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
|
|
@ -657,10 +657,10 @@ void EditorVisualProfiler::_bind_methods() {
|
|||
|
||||
void EditorVisualProfiler::_update_button_text() {
|
||||
if (activate->is_pressed()) {
|
||||
activate->set_icon(get_editor_theme_icon(SNAME("Stop")));
|
||||
activate->set_button_icon(get_editor_theme_icon(SNAME("Stop")));
|
||||
activate->set_text(TTR("Stop"));
|
||||
} else {
|
||||
activate->set_icon(get_editor_theme_icon(SNAME("Play")));
|
||||
activate->set_button_icon(get_editor_theme_icon(SNAME("Play")));
|
||||
activate->set_text(TTR("Start"));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,9 +95,9 @@ void ScriptEditorDebugger::debug_copy() {
|
|||
void ScriptEditorDebugger::debug_skip_breakpoints() {
|
||||
skip_breakpoints_value = !skip_breakpoints_value;
|
||||
if (skip_breakpoints_value) {
|
||||
skip_breakpoints->set_icon(get_editor_theme_icon(SNAME("DebugSkipBreakpointsOn")));
|
||||
skip_breakpoints->set_button_icon(get_editor_theme_icon(SNAME("DebugSkipBreakpointsOn")));
|
||||
} else {
|
||||
skip_breakpoints->set_icon(get_editor_theme_icon(SNAME("DebugSkipBreakpointsOff")));
|
||||
skip_breakpoints->set_button_icon(get_editor_theme_icon(SNAME("DebugSkipBreakpointsOff")));
|
||||
}
|
||||
|
||||
Array msg;
|
||||
|
|
@ -870,14 +870,14 @@ void ScriptEditorDebugger::_notification(int p_what) {
|
|||
case NOTIFICATION_THEME_CHANGED: {
|
||||
tabs->add_theme_style_override(SceneStringName(panel), get_theme_stylebox(SNAME("DebuggerPanel"), EditorStringName(EditorStyles)));
|
||||
|
||||
skip_breakpoints->set_icon(get_editor_theme_icon(skip_breakpoints_value ? SNAME("DebugSkipBreakpointsOn") : SNAME("DebugSkipBreakpointsOff")));
|
||||
copy->set_icon(get_editor_theme_icon(SNAME("ActionCopy")));
|
||||
step->set_icon(get_editor_theme_icon(SNAME("DebugStep")));
|
||||
next->set_icon(get_editor_theme_icon(SNAME("DebugNext")));
|
||||
dobreak->set_icon(get_editor_theme_icon(SNAME("Pause")));
|
||||
docontinue->set_icon(get_editor_theme_icon(SNAME("DebugContinue")));
|
||||
vmem_refresh->set_icon(get_editor_theme_icon(SNAME("Reload")));
|
||||
vmem_export->set_icon(get_editor_theme_icon(SNAME("Save")));
|
||||
skip_breakpoints->set_button_icon(get_editor_theme_icon(skip_breakpoints_value ? SNAME("DebugSkipBreakpointsOn") : SNAME("DebugSkipBreakpointsOff")));
|
||||
copy->set_button_icon(get_editor_theme_icon(SNAME("ActionCopy")));
|
||||
step->set_button_icon(get_editor_theme_icon(SNAME("DebugStep")));
|
||||
next->set_button_icon(get_editor_theme_icon(SNAME("DebugNext")));
|
||||
dobreak->set_button_icon(get_editor_theme_icon(SNAME("Pause")));
|
||||
docontinue->set_button_icon(get_editor_theme_icon(SNAME("DebugContinue")));
|
||||
vmem_refresh->set_button_icon(get_editor_theme_icon(SNAME("Reload")));
|
||||
vmem_export->set_button_icon(get_editor_theme_icon(SNAME("Save")));
|
||||
search->set_right_icon(get_editor_theme_icon(SNAME("Search")));
|
||||
|
||||
reason->add_theme_color_override(SceneStringName(font_color), get_theme_color(SNAME("error_color"), EditorStringName(Editor)));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue