Merge pull request #54956 from Calinou/lineedit-textedit-add-caret-width-theme-item

Add a theme constant to change LineEdit and TextEdit's caret width
This commit is contained in:
Rémi Verschelde
2022-01-13 09:21:01 +01:00
committed by GitHub
5 changed files with 13 additions and 5 deletions

View File

@ -1244,7 +1244,7 @@ void TextEdit::_notification(int p_what) {
}
// Carets.
int caret_width = Math::round(1 * get_theme_default_base_scale());
const int caret_width = get_theme_constant(SNAME("caret_width")) * get_theme_default_base_scale();
if (!clipped && caret.line == line && line_wrap_index == caret_wrap_index) {
caret.draw_pos.y = ofs_y + ldata->get_line_descent(line_wrap_index);