Closed humdingerb closed 6 years ago
you can change line
136 view->SetHighColor(0,0,0);
to
if (IsSelected()) {
view->SetHighColor(ui_color(B_LIST_SELECTED_ITEM_TEXT_COLOR));
view->SetLowColor(ui_color(B_LIST_SELECTED_BACKGROUND_COLOR));
}
else {
view->SetHighColor(ui_color(B_LIST_ITEM_TEXT_COLOR));
view->SetLowColor(ui_color(B_LIST_BACKGROUND_COLOR));
}
and add a view->PushState();
at the beginning of the function KeyItem::DrawKey
and a view->PopState();
at the end
How come you so brilliantly solve issues with two lines of code?! :) I made the change (and removed the color setting at the end of DrawKey() which is no longer needed with the PopState()) and everything's fine.
Merge if you agree.
Use B_LIST_SELECTED_BACKGROUND_COLOR etc. instead of hard coded colours.
There's still an issue with setting the right LowColor of the view to avoid white pixels around text (set your B_LIST_SELECTED_BACKGROUND_COLOR to e.g. dark blue), but the combinatorics of the draw methods (DrawMods, DrawKey) to get the modifier keys etc. drawn are too convoluted for my little brain...