diff --git a/data/gui/widget/text_box_default.cfg b/data/gui/widget/text_box_default.cfg index 3d4a84a445a8..59e1ca5d7b15 100644 --- a/data/gui/widget/text_box_default.cfg +++ b/data/gui/widget/text_box_default.cfg @@ -66,7 +66,8 @@ x2 = "(cursor_offset + {X_OFFSET})" y2 = "(text_y_offset + text_font_height - 2)" color = "255, 255, 255, 255" - alpha = "(cursor_alpha)" + # TODO: disabled until there's a way to deal with textboxes on multiple windows + #alpha = "(cursor_alpha)" thickness = 1 [/line] #enddef diff --git a/src/gui/widgets/text.cpp b/src/gui/widgets/text.cpp index 2170b14aad16..ed0610647c0d 100644 --- a/src/gui/widgets/text.cpp +++ b/src/gui/widgets/text.cpp @@ -40,7 +40,7 @@ ttext_::ttext_() , selection_length_(0) , cursor_timer_(0) , cursor_alpha_(0) - , cursor_blink_rate_ms_(750) + , cursor_blink_rate_ms_(0) // TODO: disabled until there's a way to deal with textboxes on multiple windows , text_changed_callback_() { #ifdef __unix__ @@ -254,6 +254,10 @@ void ttext_::set_state(const tstate state) void ttext_::toggle_cursor_timer(bool enable) { + if(!cursor_blink_rate_ms_) { + return; + } + if(cursor_timer_) { remove_timer(cursor_timer_); } @@ -285,6 +289,10 @@ void ttext_::cursor_timer_callback() void ttext_::reset_cursor_state() { + if(!cursor_blink_rate_ms_) { + return; + } + cursor_alpha_ = 255; for(auto& tmp : canvas()) {