mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
GTextEditor: Only draw the cursor line background shade when focused.
This commit is contained in:
parent
6db132069f
commit
dff57909a7
Notes:
sideshowbarker
2024-07-19 15:08:59 +09:00
Author: https://github.com/awesomekling
Commit: dff57909a7
1 changed files with 1 additions and 1 deletions
|
@ -98,7 +98,7 @@ void GTextEditor::paint_event(GPaintEvent& event)
|
|||
auto& line = m_lines[i];
|
||||
auto line_rect = line_content_rect(i);
|
||||
line_rect.set_width(exposed_width);
|
||||
if (i == m_cursor.line())
|
||||
if (i == m_cursor.line() && is_focused())
|
||||
painter.fill_rect(line_rect, Color(230, 230, 230));
|
||||
painter.draw_text(line_rect, line.text(), TextAlignment::CenterLeft, Color::Black);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue