mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-27 06:48:49 +00:00
GTableView: Add a way to turn off alternating row colors.
This commit is contained in:
parent
491aa112ab
commit
b54ab06595
Notes:
sideshowbarker
2024-07-19 15:02:19 +09:00
Author: https://github.com/awesomekling
Commit: b54ab06595
5 changed files with 15 additions and 7 deletions
|
@ -157,8 +157,13 @@ void GTableView::paint_event(GPaintEvent& event)
|
|||
key_column_background_color = is_focused() ? Color::from_rgb(0x84351a) : Color::from_rgb(0x606060);
|
||||
text_color = Color::White;
|
||||
} else {
|
||||
background_color = painted_item_index % 2 ? Color(210, 210, 210) : Color::White;
|
||||
key_column_background_color = painted_item_index % 2 ? Color(190, 190, 190) : Color(235, 235, 235);
|
||||
if (alternating_row_colors() && (painted_item_index % 2)) {
|
||||
background_color = Color(210, 210, 210);
|
||||
key_column_background_color = Color(190, 190, 190);
|
||||
} else {
|
||||
background_color = Color::White;
|
||||
key_column_background_color = Color(235, 235, 235);
|
||||
}
|
||||
text_color = Color::Black;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue