diff options
author | Andreas Kling <kling@serenityos.org> | 2020-02-12 19:35:25 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-02-12 19:35:25 +0100 |
commit | 0cdf68f6688f8bac1b69e4a2f5b5f27a5c24f938 (patch) | |
tree | 9b50cd6b8bd32294a3bb75006333e1702cb7e122 | |
parent | 29aee5e0d6f2d5231defe6349f5f66e0fdccde6f (diff) | |
download | serenity-0cdf68f6688f8bac1b69e4a2f5b5f27a5c24f938.zip |
LibGUI: Always unhighlight table view column headers when cursor leaves
If the cursor left a table view column header while also pressing it,
we would keep the header highlighted. This was not consistent with how
regular buttons behaved.
-rw-r--r-- | Libraries/LibGUI/AbstractTableView.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Libraries/LibGUI/AbstractTableView.cpp b/Libraries/LibGUI/AbstractTableView.cpp index 13b87c48d7..bea23dfe71 100644 --- a/Libraries/LibGUI/AbstractTableView.cpp +++ b/Libraries/LibGUI/AbstractTableView.cpp @@ -274,10 +274,12 @@ void AbstractTableView::mousemove_event(MouseEvent& event) if (m_pressed_column_header_index != -1) { auto header_rect = this->header_rect(m_pressed_column_header_index); if (header_rect.contains(event.position())) { + set_hovered_header_index(m_pressed_column_header_index); if (!m_pressed_column_header_is_pressed) update_headers(); m_pressed_column_header_is_pressed = true; } else { + set_hovered_header_index(-1); if (m_pressed_column_header_is_pressed) update_headers(); m_pressed_column_header_is_pressed = false; |