mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 19:35:08 +00:00
LibGUI: Remove barely used AbstractView::is_highlighting_searching()
This commit is contained in:
parent
0cbc222c17
commit
aeffd9024e
2 changed files with 1 additions and 7 deletions
|
@ -666,11 +666,6 @@ void AbstractView::set_searchable(bool searchable)
|
||||||
cancel_searching();
|
cancel_searching();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AbstractView::is_highlighting_searching(const ModelIndex& index) const
|
|
||||||
{
|
|
||||||
return index == m_highlighted_search_index;
|
|
||||||
}
|
|
||||||
|
|
||||||
void AbstractView::draw_item_text(Gfx::Painter& painter, const ModelIndex& index, bool is_selected, const Gfx::IntRect& text_rect, const StringView& item_text, const Gfx::Font& font, Gfx::TextAlignment alignment, Gfx::TextElision elision, size_t search_highlighting_offset)
|
void AbstractView::draw_item_text(Gfx::Painter& painter, const ModelIndex& index, bool is_selected, const Gfx::IntRect& text_rect, const StringView& item_text, const Gfx::Font& font, Gfx::TextAlignment alignment, Gfx::TextElision elision, size_t search_highlighting_offset)
|
||||||
{
|
{
|
||||||
if (m_edit_index == index)
|
if (m_edit_index == index)
|
||||||
|
@ -681,7 +676,7 @@ void AbstractView::draw_item_text(Gfx::Painter& painter, const ModelIndex& index
|
||||||
text_color = is_focused() ? palette().selection_text() : palette().inactive_selection_text();
|
text_color = is_focused() ? palette().selection_text() : palette().inactive_selection_text();
|
||||||
else
|
else
|
||||||
text_color = index.data(ModelRole::ForegroundColor).to_color(palette().color(foreground_role()));
|
text_color = index.data(ModelRole::ForegroundColor).to_color(palette().color(foreground_role()));
|
||||||
if (is_highlighting_searching(index)) {
|
if (index == m_highlighted_search_index) {
|
||||||
Utf8View searching_text(m_searching);
|
Utf8View searching_text(m_searching);
|
||||||
auto searching_length = searching_text.length();
|
auto searching_length = searching_text.length();
|
||||||
if (searching_length > search_highlighting_offset)
|
if (searching_length > search_highlighting_offset)
|
||||||
|
|
|
@ -166,7 +166,6 @@ protected:
|
||||||
void cancel_searching();
|
void cancel_searching();
|
||||||
void start_searching_timer();
|
void start_searching_timer();
|
||||||
void do_search(String&&);
|
void do_search(String&&);
|
||||||
bool is_highlighting_searching(const ModelIndex&) const;
|
|
||||||
|
|
||||||
ModelIndex drop_candidate_index() const { return m_drop_candidate_index; }
|
ModelIndex drop_candidate_index() const { return m_drop_candidate_index; }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue