Merge pull request #31848 from Chaosus/fix_graph_resizer_style
Fix resizer icon visiblity on light theme in GraphNode
This commit is contained in:
commit
a02d2fdb84
7 changed files with 9 additions and 1 deletions
|
@ -257,6 +257,8 @@
|
|||
</theme_item>
|
||||
<theme_item name="resizer" type="Texture">
|
||||
</theme_item>
|
||||
<theme_item name="resizer_color" type="Color" default="Color( 0, 0, 0, 1 )">
|
||||
</theme_item>
|
||||
<theme_item name="selectedframe" type="StyleBox">
|
||||
</theme_item>
|
||||
<theme_item name="separation" type="int" default="1">
|
||||
|
|
|
@ -1066,6 +1066,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
|
|||
theme->set_color("title_color", "GraphNode", default_node_color);
|
||||
default_node_color.a = 0.7;
|
||||
theme->set_color("close_color", "GraphNode", default_node_color);
|
||||
theme->set_color("resizer_color", "GraphNode", default_node_color);
|
||||
|
||||
theme->set_constant("port_offset", "GraphNode", 14 * EDSCALE);
|
||||
theme->set_constant("title_h_offset", "GraphNode", -16 * EDSCALE);
|
||||
|
|
|
@ -249,6 +249,7 @@ void AnimationNodeBlendTreeEditor::_update_graph() {
|
|||
node->add_color_override("title_color", c);
|
||||
c.a = 0.7;
|
||||
node->add_color_override("close_color", c);
|
||||
node->add_color_override("resizer_color", c);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -410,6 +410,7 @@ void VisualShaderEditor::_update_created_node(GraphNode *node) {
|
|||
node->add_color_override("title_color", c);
|
||||
c.a = 0.7;
|
||||
node->add_color_override("close_color", c);
|
||||
node->add_color_override("resizer_color", c);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -591,6 +591,7 @@ void VisualScriptEditor::_update_graph(int p_only_id) {
|
|||
gnode->add_color_override("title_color", c);
|
||||
c.a = 0.7;
|
||||
gnode->add_color_override("close_color", c);
|
||||
gnode->add_color_override("resizer_color", c);
|
||||
gnode->add_style_override("frame", sbf);
|
||||
}
|
||||
|
||||
|
|
|
@ -210,6 +210,7 @@ void GraphNode::_notification(int p_what) {
|
|||
int close_offset = get_constant("close_offset");
|
||||
int close_h_offset = get_constant("close_h_offset");
|
||||
Color close_color = get_color("close_color");
|
||||
Color resizer_color = get_color("resizer_color");
|
||||
Ref<Font> title_font = get_font("title_font");
|
||||
int title_offset = get_constant("title_offset");
|
||||
int title_h_offset = get_constant("title_h_offset");
|
||||
|
@ -274,7 +275,7 @@ void GraphNode::_notification(int p_what) {
|
|||
}
|
||||
|
||||
if (resizable) {
|
||||
draw_texture(resizer, get_size() - resizer->get_size());
|
||||
draw_texture(resizer, get_size() - resizer->get_size(), resizer_color);
|
||||
}
|
||||
} break;
|
||||
|
||||
|
|
|
@ -611,6 +611,7 @@ void fill_default_theme(Ref<Theme> &theme, const Ref<Font> &default_font, const
|
|||
theme->set_font("title_font", "GraphNode", default_font);
|
||||
theme->set_color("title_color", "GraphNode", Color(0, 0, 0, 1));
|
||||
theme->set_color("close_color", "GraphNode", Color(0, 0, 0, 1));
|
||||
theme->set_color("resizer_color", "GraphNode", Color(0, 0, 0, 1));
|
||||
theme->set_constant("title_offset", "GraphNode", 20 * scale);
|
||||
theme->set_constant("close_offset", "GraphNode", 18 * scale);
|
||||
theme->set_constant("port_offset", "GraphNode", 3 * scale);
|
||||
|
|
Loading…
Reference in a new issue