-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use system colors #49
Conversation
d5d1708
to
be15e63
Compare
owner->SetHighColor(255, 255, 255, 128); | ||
owner->SetLowColor(255, 255, 255, 128); | ||
owner->SetHighUIColor(B_LIST_BACKGROUND_COLOR); | ||
owner->SetLowUIColor(B_LIST_ITEM_TEXT_COLOR); | ||
} | ||
} | ||
owner->FillRect(frame); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something isn't right here. We go through all the effort to determine the right High- and LowColors, depending on selection, enabled and account-closed. Only to draw a rectangle.
Then in line 59 we potentially change the HighColor to stroke the frame.
Then we change the HighColor again in line 64 to draw the text.
I think the text drawing should be done right after filling the rect, when the colours to use are still valid.
Drawing the rect only needs the HighColor set. Maybe it can be simplified by using rgb_color variables and set them to either selected/unselected and then tint them if needed (enabled/disabled, account-closed).
This may be applicable to other drawing code as well...
Currently, the drawing isn't correct. Try using a white on blue text for selected list items:
Added some missing translation strings Minor code cleanup
@humdingerb I've updated the PR. Quite a lot of changes, but they are (almost) all related to the display colors. I can't seem to get the code formatting right, even when running |
This isn't a problem, the code will be automatically formatted after the merge. |
Thanks @dospuntos ! Weird that when changing system colours some things only appear right after restarting the app. Let's merge this now to get it off your plate. :) |
Fixes #48 - all windows are using color constants.
Fixes #23 - using default Haiku icons for alerts.
Additional changes:
Notes: