mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-11 18:20:43 +09:00
LibGUI: Paint text selections as active in Popups
And hide TextEditor cursors in active windows when focus is preempted
This commit is contained in:
parent
f7eb72a8be
commit
a6581c2aac
Notes:
sideshowbarker
2024-07-17 18:49:10 +09:00
Author: https://github.com/thankyouverycool
Commit: a6581c2aac
Pull-request: https://github.com/SerenityOS/serenity/pull/16098
1 changed files with 3 additions and 3 deletions
|
@ -727,8 +727,8 @@ void TextEditor::paint_event(PaintEvent& event)
|
|||
visual_line_rect.height()
|
||||
};
|
||||
|
||||
Color background_color = window()->is_active() ? palette().selection() : palette().inactive_selection();
|
||||
Color text_color = window()->is_active() ? palette().selection_text() : palette().inactive_selection_text();
|
||||
Color background_color = is_focused() ? palette().selection() : palette().inactive_selection();
|
||||
Color text_color = is_focused() ? palette().selection_text() : palette().inactive_selection_text();
|
||||
|
||||
painter.fill_rect(selection_rect, background_color);
|
||||
|
||||
|
@ -748,7 +748,7 @@ void TextEditor::paint_event(PaintEvent& event)
|
|||
});
|
||||
}
|
||||
|
||||
if (is_enabled() && is_focused() && m_cursor_state && !is_displayonly())
|
||||
if (is_enabled() && is_focused() && !focus_preempted() && m_cursor_state && !is_displayonly())
|
||||
painter.fill_rect(cursor_content_rect(), palette().text_cursor());
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue