summaryrefslogtreecommitdiff
path: root/editor/editor_inspector.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2018-10-24 20:00:22 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2018-10-24 20:05:48 +0200
commitdee6a8b93c04a4e0798ba1c39cc6f01f5a5eb12d (patch)
treef0cdb1430d5783e00cb8e8b34180ce5be18ca62e /editor/editor_inspector.cpp
parent8c37c1e98dfc17fd27aebc7dd56b7579785d7bf9 (diff)
Make editor tooltips wider and scale them on hiDPI displays
This also changes the TTR() call to avoid creating a duplicate ("Property:" is already used in other places).
Diffstat (limited to 'editor/editor_inspector.cpp')
-rw-r--r--editor/editor_inspector.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index a90f15004a..3ecaa2b136 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -738,9 +738,9 @@ Control *EditorProperty::make_custom_tooltip(const String &p_text) const {
tooltip_text = p_text;
EditorHelpBit *help_bit = memnew(EditorHelpBit);
help_bit->add_style_override("panel", get_stylebox("panel", "TooltipPanel"));
- help_bit->get_rich_text()->set_fixed_size_to_width(300);
+ help_bit->get_rich_text()->set_fixed_size_to_width(360 * EDSCALE);
- String text = TTR("Property: ") + "[u][b]" + p_text.get_slice("::", 0) + "[/b][/u]\n";
+ String text = TTR("Property:") + " [u][b]" + p_text.get_slice("::", 0) + "[/b][/u]\n";
text += p_text.get_slice("::", 1).strip_edges();
help_bit->set_text(text);
help_bit->call_deferred("set_text", text); //hack so it uses proper theme once inside scene
@@ -960,7 +960,7 @@ Control *EditorInspectorCategory::make_custom_tooltip(const String &p_text) cons
tooltip_text = p_text;
EditorHelpBit *help_bit = memnew(EditorHelpBit);
help_bit->add_style_override("panel", get_stylebox("panel", "TooltipPanel"));
- help_bit->get_rich_text()->set_fixed_size_to_width(300);
+ help_bit->get_rich_text()->set_fixed_size_to_width(360 * EDSCALE);
String text = "[u][b]" + p_text.get_slice("::", 0) + "[/b][/u]\n";
text += p_text.get_slice("::", 1).strip_edges();