mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-21 03:55:24 +00:00
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.
This commit is contained in:
parent
16c290e8d5
commit
e08d605f72
Notes:
sideshowbarker
2024-07-19 11:07:50 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/e08d605f721
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue