summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/color_picker.cpp3
-rw-r--r--scene/gui/text_edit.cpp2
2 files changed, 4 insertions, 1 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 03eee9c6d8..c5d3def4c1 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -159,7 +159,10 @@ void ColorPicker::_html_entered(const String &p_html) {
if (updating)
return;
+ float last_alpha = color.a;
color = Color::html(p_html);
+ if (!is_editing_alpha())
+ color.a = last_alpha;
if (!is_inside_tree())
return;
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index bbd9369547..32580a5ae6 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -3257,7 +3257,7 @@ void TextEdit::_scroll_down(real_t p_delta) {
}
if (smooth_scroll_enabled) {
- int max_v_scroll = v_scroll->get_max() - v_scroll->get_page();
+ int max_v_scroll = round(v_scroll->get_max() - v_scroll->get_page());
if (target_v_scroll > max_v_scroll) {
target_v_scroll = max_v_scroll;
v_scroll->set_value(target_v_scroll);