HaikuArchives / BeAE

Well featured audio editor for Haiku
Other
7 stars 8 forks source link

Fix keybinding prefs item colours #34

Closed humdingerb closed 6 years ago

humdingerb commented 6 years ago

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...

janus2 commented 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

humdingerb commented 6 years ago

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.