From e08d605f721548a429e2fe1f76239b90cbf734fe Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Wed, 20 Nov 2019 22:22:51 +0100 Subject: [PATCH] GTableView: Don't hover-highlight unsortable column headers The hover highlight is meant to indicate that the button is pressable. Non-sortable columns are not pressable. --- Libraries/LibGUI/GTableView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/LibGUI/GTableView.cpp b/Libraries/LibGUI/GTableView.cpp index df9321bc61..d2f328ba3e 100644 --- a/Libraries/LibGUI/GTableView.cpp +++ b/Libraries/LibGUI/GTableView.cpp @@ -397,7 +397,7 @@ void GTableView::paint_headers(Painter& painter) bool is_key_column = model()->key_column() == column_index; Rect cell_rect(x_offset, 0, column_width + horizontal_padding() * 2, header_height()); bool pressed = column_index == m_pressed_column_header_index && m_pressed_column_header_is_pressed; - bool hovered = column_index == m_hovered_column_header_index; + bool hovered = column_index == m_hovered_column_header_index && model()->column_metadata(column_index).sortable == GModel::ColumnMetadata::Sortable::True; StylePainter::paint_button(painter, cell_rect, ButtonStyle::Normal, pressed, hovered); String text; if (is_key_column) {