|
@@ -400,7 +400,7 @@ void TextEditor::paint_event(PaintEvent& event)
|
|
painter.add_clip_rect(event.rect());
|
|
painter.add_clip_rect(event.rect());
|
|
painter.fill_rect(event.rect(), widget_background_color);
|
|
painter.fill_rect(event.rect(), widget_background_color);
|
|
|
|
|
|
- if (is_displayonly() && (is_focused() || has_visible_list())) {
|
|
|
|
|
|
+ if (is_displayonly() && is_focused()) {
|
|
widget_background_color = palette().selection();
|
|
widget_background_color = palette().selection();
|
|
Gfx::IntRect display_rect {
|
|
Gfx::IntRect display_rect {
|
|
widget_inner_rect().x() + 1,
|
|
widget_inner_rect().x() + 1,
|
|
@@ -502,12 +502,12 @@ void TextEditor::paint_event(PaintEvent& event)
|
|
} else if (!document().has_spans()) {
|
|
} else if (!document().has_spans()) {
|
|
// Fast-path for plain text
|
|
// Fast-path for plain text
|
|
auto color = palette().color(is_enabled() ? foreground_role() : Gfx::ColorRole::DisabledText);
|
|
auto color = palette().color(is_enabled() ? foreground_role() : Gfx::ColorRole::DisabledText);
|
|
- if (is_displayonly() && (is_focused() || has_visible_list()))
|
|
|
|
|
|
+ if (is_displayonly() && is_focused())
|
|
color = palette().color(is_enabled() ? Gfx::ColorRole::SelectionText : Gfx::ColorRole::DisabledText);
|
|
color = palette().color(is_enabled() ? Gfx::ColorRole::SelectionText : Gfx::ColorRole::DisabledText);
|
|
painter.draw_text(visual_line_rect, visual_line_text, m_text_alignment, color);
|
|
painter.draw_text(visual_line_rect, visual_line_text, m_text_alignment, color);
|
|
} else {
|
|
} else {
|
|
auto unspanned_color = palette().color(is_enabled() ? foreground_role() : Gfx::ColorRole::DisabledText);
|
|
auto unspanned_color = palette().color(is_enabled() ? foreground_role() : Gfx::ColorRole::DisabledText);
|
|
- if (is_displayonly() && (is_focused() || has_visible_list()))
|
|
|
|
|
|
+ if (is_displayonly() && is_focused())
|
|
unspanned_color = palette().color(is_enabled() ? Gfx::ColorRole::SelectionText : Gfx::ColorRole::DisabledText);
|
|
unspanned_color = palette().color(is_enabled() ? Gfx::ColorRole::SelectionText : Gfx::ColorRole::DisabledText);
|
|
RefPtr<Gfx::Font> unspanned_font = this->font();
|
|
RefPtr<Gfx::Font> unspanned_font = this->font();
|
|
|
|
|
|
@@ -1375,13 +1375,6 @@ void TextEditor::set_mode(const Mode mode)
|
|
set_override_cursor(Gfx::StandardCursor::None);
|
|
set_override_cursor(Gfx::StandardCursor::None);
|
|
}
|
|
}
|
|
|
|
|
|
-void TextEditor::set_has_visible_list(bool visible)
|
|
|
|
-{
|
|
|
|
- if (m_has_visible_list == visible)
|
|
|
|
- return;
|
|
|
|
- m_has_visible_list = visible;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
void TextEditor::did_update_selection()
|
|
void TextEditor::did_update_selection()
|
|
{
|
|
{
|
|
m_cut_action->set_enabled(is_editable() && has_selection());
|
|
m_cut_action->set_enabled(is_editable() && has_selection());
|