summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authormarcelofg55 <marcelofg55@gmail.com>2016-06-02 18:56:28 -0300
committermarcelofg55 <marcelofg55@gmail.com>2016-06-02 18:56:28 -0300
commit4e0f2389c3a79f1e558ee13e6d51e7dbe531368e (patch)
treea8bd2b831ae005a614d2a5c8a56ea4bccec3d59e /scene/gui
parentbb223869e0d016d372d8f3d98b3d5680cc069368 (diff)
parentbc25492e636a82a30d77aa1b37edede0a2a9182f (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/control.cpp1
-rw-r--r--scene/gui/text_edit.cpp26
2 files changed, 14 insertions, 13 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 73e7237058..0522b2efed 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -1810,6 +1810,7 @@ void Control::_propagate_theme_changed(Control *p_owner) {
void Control::set_theme(const Ref<Theme>& p_theme) {
+
data.theme=p_theme;
if (!p_theme.is_null()) {
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index fd6e97d33f..fe03b34105 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -700,15 +700,6 @@ void TextEdit::_notification(int p_what) {
if (highlighted_text.length() != 0 && highlighted_text != search_text)
highlighted_text_col = _get_column_pos_of_word(highlighted_text, str, SEARCH_MATCH_CASE|SEARCH_WHOLE_WORDS, 0);
- if (cache.line_number_w) {
- String fc = String::num(line+1);
- while (fc.length() < line_number_char_count) {
- fc="0"+fc;
- }
-
- cache.font->draw(ci,Point2(cache.style_normal->get_margin(MARGIN_LEFT)+cache.breakpoint_gutter_width,ofs_y+cache.font->get_ascent()),fc,cache.line_number_color);
- }
-
const Map<int,Text::ColorRegionInfo>& cri_map=text.get_color_region_info(line);
@@ -720,8 +711,14 @@ void TextEdit::_notification(int p_what) {
if (text.is_breakpoint(line)) {
VisualServer::get_singleton()->canvas_item_add_rect(ci,Rect2(xmargin_beg, ofs_y,xmargin_end-xmargin_beg,get_row_height()),cache.breakpoint_color);
+ }
+
+ if (line==cursor.line) {
+ VisualServer::get_singleton()->canvas_item_add_rect(ci,Rect2(0, ofs_y,xmargin_end,get_row_height()),cache.current_line_color);
+ }
- // draw breakpoint marker
+ // draw breakpoint marker
+ if (text.is_breakpoint(line)) {
if (draw_breakpoint_gutter) {
int vertical_gap = cache.breakpoint_gutter_width / 2;
int marker_size = cache.breakpoint_gutter_width - vertical_gap;
@@ -731,10 +728,13 @@ void TextEdit::_notification(int p_what) {
}
- if (line==cursor.line) {
-
- VisualServer::get_singleton()->canvas_item_add_rect(ci,Rect2(xmargin_beg, ofs_y,xmargin_end-xmargin_beg,get_row_height()),cache.current_line_color);
+ if (cache.line_number_w) {
+ String fc = String::num(line+1);
+ while (fc.length() < line_number_char_count) {
+ fc="0"+fc;
+ }
+ cache.font->draw(ci,Point2(cache.style_normal->get_margin(MARGIN_LEFT)+cache.breakpoint_gutter_width,ofs_y+cache.font->get_ascent()),fc,cache.line_number_color);
}
for (int j=0;j<str.length();j++) {