WebPositive: Address bar list uses user colors.
* Before this commit address bar used: B_MENU, B_LIST, B_DOCUMENT colors. With strange results during customization. * Now the address uses list user colors. * Partialy fixes #10840.
This commit is contained in:
@@ -273,15 +273,17 @@ BDefaultChoiceView::ListItem::DrawItem(BView* owner, BRect frame,
|
|||||||
rgb_color backColor;
|
rgb_color backColor;
|
||||||
rgb_color matchColor;
|
rgb_color matchColor;
|
||||||
if (IsSelected()) {
|
if (IsSelected()) {
|
||||||
textColor = ui_color(B_MENU_SELECTED_ITEM_TEXT_COLOR);
|
textColor = ui_color(B_LIST_SELECTED_ITEM_TEXT_COLOR);
|
||||||
backColor = ui_color(B_MENU_SELECTED_BACKGROUND_COLOR);
|
backColor = ui_color(B_LIST_SELECTED_BACKGROUND_COLOR);
|
||||||
} else {
|
} else {
|
||||||
textColor = ui_color(B_DOCUMENT_TEXT_COLOR);
|
textColor = ui_color(B_LIST_ITEM_TEXT_COLOR);
|
||||||
backColor = ui_color(B_DOCUMENT_BACKGROUND_COLOR);
|
backColor = ui_color(B_LIST_BACKGROUND_COLOR);
|
||||||
}
|
}
|
||||||
matchColor = tint_color(backColor, (B_NO_TINT + B_DARKEN_1_TINT) / 2);
|
matchColor = tint_color(backColor, (B_NO_TINT + B_DARKEN_1_TINT) / 2);
|
||||||
nonMatchTextColor = tint_color(backColor, 1.7);
|
if (textColor.red + textColor.green + textColor.blue > 128 * 3)
|
||||||
|
nonMatchTextColor = tint_color(textColor, 1.2);
|
||||||
|
else
|
||||||
|
nonMatchTextColor = tint_color(textColor, 0.75);
|
||||||
BFont font;
|
BFont font;
|
||||||
font_height fontHeight;
|
font_height fontHeight;
|
||||||
owner->GetFont(&font);
|
owner->GetFont(&font);
|
||||||
|
|||||||
Reference in New Issue
Block a user