diff options
-rw-r--r-- | core/variant_parser.cpp | 8 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 13 | ||||
-rw-r--r-- | platform/osx/os_osx.mm | 2 | ||||
-rw-r--r-- | scene/gui/rich_text_label.cpp | 2 |
4 files changed, 16 insertions, 9 deletions
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp index 0553ba4319..da78d98134 100644 --- a/core/variant_parser.cpp +++ b/core/variant_parser.cpp @@ -744,7 +744,12 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, return err; if (token.type == TK_PARENTHESIS_CLOSE) { - + Reference *reference = obj->cast_to<Reference>(); + if (reference) { + value = REF(reference); + } else { + value = obj; + } return OK; } @@ -760,7 +765,6 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream, } } - get_token(p_stream, token, line, r_err_str); if (token.type != TK_STRING) { r_err_str = "Expected property name as string"; return ERR_PARSE_ERROR; diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 4e44251f35..2fbf344ec9 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -145,8 +145,8 @@ Ref<Theme> create_editor_theme() { theme->set_icon("unchecked", "PopupMenu", theme->get_icon("Unchecked", "EditorIcons")); // Editor background - Ref<StyleBoxFlat> style_background = make_flat_stylebox(dark_color_2, 4, 4, 4, 4); - theme->set_stylebox("Background", "EditorStyles", style_background); + Ref<StyleBoxFlat> style_panel = make_flat_stylebox(dark_color_2, 4, 4, 4, 4); + theme->set_stylebox("Background", "EditorStyles", style_panel); // Focus Ref<StyleBoxFlat> focus_sbt = make_flat_stylebox(light_color_1, 4, 4, 4, 4); @@ -193,9 +193,9 @@ Ref<Theme> create_editor_theme() { theme->set_stylebox("MenuHover", "EditorStyles", style_menu_hover_border); // Content of each tab - Ref<StyleBoxFlat> style_panel = make_flat_stylebox(base_color, 1, 4, 1, 1); - theme->set_stylebox("panel", "TabContainer", style_panel); - theme->set_stylebox("Content", "EditorStyles", style_panel); + Ref<StyleBoxFlat> style_content_panel = make_flat_stylebox(base_color, 1, 4, 1, 1); + theme->set_stylebox("panel", "TabContainer", style_content_panel); + theme->set_stylebox("Content", "EditorStyles", style_content_panel); // Button Ref<StyleBoxFlat> style_button = make_flat_stylebox(dark_color_1, 4, 4, 4, 4); @@ -394,6 +394,9 @@ Ref<Theme> create_editor_theme() { theme->set_icon("grabber", "VSlider", theme->get_icon("SliderGrabber", "EditorIcons")); theme->set_icon("grabber_highlight", "VSlider", theme->get_icon("SliderGrabberHl", "EditorIcons")); + // Panel + theme->set_stylebox("panel", "Panel", style_panel); + // TooltipPanel Ref<StyleBoxFlat> style_tooltip = make_flat_stylebox(Color(1, 1, 1, 0.8), 8, 8, 8, 8); style_tooltip->set_border_size(2 * EDSCALE); diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index cb37f18090..54b1802250 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -365,7 +365,7 @@ static int button_mask = 0; - (void)rightMouseUp:(NSEvent *)event { - button_mask |= BUTTON_MASK_RIGHT; + button_mask &= ~BUTTON_MASK_RIGHT; Ref<InputEventMouseButton> mb; mb.instance(); diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index d3a49b06d5..0b8595de42 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -264,7 +264,7 @@ void RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int cw = tab_size * font->get_char_size(' ').width; } - if (end > 0 && w + cw + wofs > p_width) { + if (end > 0 && w + cw + begin > p_width) { break; //don't allow lines longer than assigned width } |