1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:47:44 +00:00

LibGUI: Don't paint text cursor if TextEditor is disabled

This looked a bit odd in the rare case of disabling a focused
TextEditor.
This commit is contained in:
Marcus Nilsson 2022-01-09 21:44:44 +01:00 committed by Andreas Kling
parent bcf764cecf
commit 315e1c705f

View file

@ -719,7 +719,7 @@ void TextEditor::paint_event(PaintEvent& event)
painter.draw_scaled_bitmap(icon_rect, *m_icon, m_icon->rect());
}
if (is_focused() && m_cursor_state && !is_displayonly())
if (is_enabled() && is_focused() && m_cursor_state && !is_displayonly())
painter.fill_rect(cursor_content_rect(), palette().text_cursor());
}