summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/editor_inspector.cpp9
-rw-r--r--editor/editor_node.cpp2
-rw-r--r--editor/editor_plugin.h11
-rw-r--r--editor/editor_settings.cpp2
-rw-r--r--editor/editor_themes.cpp3
5 files changed, 14 insertions, 13 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index 73acea43fd..d5cd61d792 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -258,7 +258,7 @@ void EditorProperty::_notification(int p_what) {
}
int ofs = get_theme_constant(SNAME("font_offset"));
- int text_limit = text_size;
+ int text_limit = text_size - ofs;
if (checkable) {
Ref<Texture2D> checkbox;
@@ -280,8 +280,9 @@ void EditorProperty::_notification(int p_what) {
} else {
draw_texture(checkbox, check_rect.position, color2);
}
- ofs += get_theme_constant(SNAME("hseparator"), SNAME("Tree")) + checkbox->get_width() + get_theme_constant(SNAME("hseparation"), SNAME("CheckBox"));
- text_limit -= ofs;
+ int check_ofs = get_theme_constant(SNAME("hseparator"), SNAME("Tree")) + checkbox->get_width() + get_theme_constant(SNAME("hseparation"), SNAME("CheckBox"));
+ ofs += check_ofs;
+ text_limit -= check_ofs;
} else {
check_rect = Rect2();
}
@@ -289,7 +290,7 @@ void EditorProperty::_notification(int p_what) {
if (can_revert && !is_read_only()) {
Ref<Texture2D> reload_icon = get_theme_icon(SNAME("ReloadSmall"), SNAME("EditorIcons"));
text_limit -= reload_icon->get_width() + get_theme_constant(SNAME("hseparator"), SNAME("Tree")) * 2;
- revert_rect = Rect2(text_limit + get_theme_constant(SNAME("hseparator"), SNAME("Tree")), (size.height - reload_icon->get_height()) / 2, reload_icon->get_width(), reload_icon->get_height());
+ revert_rect = Rect2(ofs + text_limit, (size.height - reload_icon->get_height()) / 2, reload_icon->get_width(), reload_icon->get_height());
Color color2(1, 1, 1);
if (revert_hover) {
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 781b35d15b..43100ebf12 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -7033,7 +7033,7 @@ EditorNode::EditorNode() {
add_editor_plugin(memnew(ControlEditorPlugin));
for (int i = 0; i < EditorPlugins::get_plugin_count(); i++) {
- add_editor_plugin(EditorPlugins::create(i, this));
+ add_editor_plugin(EditorPlugins::create(i));
}
for (int i = 0; i < plugin_init_callback_count; i++) {
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index f23c5f40f6..1a5be7a89b 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -43,7 +43,6 @@
#include "scene/main/node.h"
#include "scene/resources/texture.h"
-class EditorNode;
class Node3D;
class Camera3D;
class EditorCommandPalette;
@@ -312,7 +311,7 @@ public:
VARIANT_ENUM_CAST(EditorPlugin::CustomControlContainer);
VARIANT_ENUM_CAST(EditorPlugin::DockSlot);
-typedef EditorPlugin *(*EditorPluginCreateFunc)(EditorNode *);
+typedef EditorPlugin *(*EditorPluginCreateFunc)();
class EditorPlugins {
enum {
@@ -323,15 +322,15 @@ class EditorPlugins {
static int creation_func_count;
template <class T>
- static EditorPlugin *creator(EditorNode *p_node) {
- return memnew(T(p_node));
+ static EditorPlugin *creator() {
+ return memnew(T);
}
public:
static int get_plugin_count() { return creation_func_count; }
- static EditorPlugin *create(int p_idx, EditorNode *p_editor) {
+ static EditorPlugin *create(int p_idx) {
ERR_FAIL_INDEX_V(p_idx, creation_func_count, nullptr);
- return creation_funcs[p_idx](p_editor);
+ return creation_funcs[p_idx]();
}
template <class T>
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 0c3f7287a5..c93a94e974 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -741,7 +741,7 @@ void EditorSettings::_load_godot2_text_editor_theme() {
_initial_set("text_editor/theme/highlighting/completion_background_color", Color(0.17, 0.16, 0.2));
_initial_set("text_editor/theme/highlighting/completion_selected_color", Color(0.26, 0.26, 0.27));
_initial_set("text_editor/theme/highlighting/completion_existing_color", Color(0.87, 0.87, 0.87, 0.13));
- _initial_set("text_editor/theme/highlighting/completion_scroll_color", Color(1, 1, 1));
+ _initial_set("text_editor/theme/highlighting/completion_scroll_color", Color(1, 1, 1, 0.29));
_initial_set("text_editor/theme/highlighting/completion_font_color", Color(0.67, 0.67, 0.67));
_initial_set("text_editor/theme/highlighting/text_color", Color(0.67, 0.67, 0.67));
_initial_set("text_editor/theme/highlighting/line_number_color", Color(0.67, 0.67, 0.67, 0.4));
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 15664bbc0b..05aa638a4b 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -1544,7 +1544,8 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color completion_background_color = dark_theme ? base_color : background_color;
const Color completion_selected_color = alpha1;
const Color completion_existing_color = alpha2;
- const Color completion_scroll_color = alpha1;
+ // Same opacity as the scroll grabber editor icon.
+ const Color completion_scroll_color = Color(mono_value, mono_value, mono_value, 0.29);
const Color completion_font_color = font_color;
const Color text_color = font_color;
const Color line_number_color = dim_color;