diff options
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/color_picker.cpp | 5 | ||||
-rw-r--r-- | scene/gui/line_edit.cpp | 4 | ||||
-rw-r--r-- | scene/gui/scroll_container.cpp | 1 | ||||
-rw-r--r-- | scene/gui/text_edit.cpp | 1 |
4 files changed, 4 insertions, 7 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp index b99128e65f..6ed465562e 100644 --- a/scene/gui/color_picker.cpp +++ b/scene/gui/color_picker.cpp @@ -176,14 +176,15 @@ void ColorPicker::_update_color() { updating = true; for (int i = 0; i < 4; i++) { - scroll[i]->set_step(0.01); if (raw_mode_enabled) { + scroll[i]->set_step(0.01); scroll[i]->set_max(100); if (i == 3) scroll[i]->set_max(1); scroll[i]->set_value(color.components[i]); } else { - const int byte_value = color.components[i] * 255; + scroll[i]->set_step(1); + const float byte_value = color.components[i] * 255.0; scroll[i]->set_max(next_power_of_2(MAX(255, byte_value)) - 1); scroll[i]->set_value(byte_value); } diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp index 4d638b50c6..4a2bb3dad1 100644 --- a/scene/gui/line_edit.cpp +++ b/scene/gui/line_edit.cpp @@ -1290,13 +1290,11 @@ int LineEdit::get_max_length() const { void LineEdit::selection_fill_at_cursor() { - int aux; - selection.begin = cursor_pos; selection.end = selection.cursor_start; if (selection.end < selection.begin) { - aux = selection.end; + int aux = selection.end; selection.end = selection.begin; selection.begin = aux; } diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp index f99f5e4d4b..28292309b9 100644 --- a/scene/gui/scroll_container.cpp +++ b/scene/gui/scroll_container.cpp @@ -271,7 +271,6 @@ void ScrollContainer::_notification(int p_what) { } if (!scroll_v || (!v_scroll->is_visible_in_tree() && c->get_v_size_flags() & SIZE_EXPAND)) { r.position.y = 0; - r.size.height = size.height; if (c->get_v_size_flags() & SIZE_EXPAND) r.size.height = MAX(size.height, minsize.height); else diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 19c054fa43..09fbb39866 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -3811,7 +3811,6 @@ Vector<String> TextEdit::get_wrap_rows_text(int p_line) const { if (indent_ofs + word_px > wrap_at) { // not enough space; add it anyway wrap_substring += word_str; - px += word_px; word_str = ""; word_px = 0; } |