mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-28 15:28:55 +00:00
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.
This commit is contained in:
parent
29aee5e0d6
commit
0cdf68f668
Notes:
sideshowbarker
2024-07-19 09:22:06 +09:00
Author: https://github.com/awesomekling
Commit: 0cdf68f668
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue