Skip to content

Commit

Permalink
Avoid hardcoding color in listbox (kallisti5#129)
Browse files Browse the repository at this point in the history
* Use const in more places

* Revert "Use const in more places"

This reverts commit 125b4aa.

* Don't hardcode listbox inactive color

Instead of hardcoding a specific color for the Inactive one, calculate it based on the Selection color.
This helps when the colors are customized from the defaults.
  • Loading branch information
midwan authored Nov 9, 2024
1 parent 1db4b1b commit cc17cf8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/widgets/listbox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ namespace gcn
startRow = 0;
}

const auto inactive_color = Color(170, 170, 170);
const auto inactive_color = getSelectionColor() - 0x303030;

// The y coordinate where we start to draw the text is
// simply the y coordinate multiplied with the font height.
Expand Down

0 comments on commit cc17cf8

Please sign in to comment.