For a smoother user experience, use different colors for inverted text of the ListWidget, depending on whether the widget has focus or not.
svn-id: r42512
This commit is contained in:
parent
6a15e14d3f
commit
6a26f1b56f
11 changed files with 376 additions and 334 deletions
|
@ -404,11 +404,15 @@ void ListWidget::drawWidget() {
|
|||
for (i = 0, pos = _currentPos; i < _entriesPerPage && pos < len; i++, pos++) {
|
||||
const int y = _y + _topPadding + kLineHeight * i;
|
||||
const int fontHeight = kLineHeight;
|
||||
bool inverted = false;
|
||||
ThemeEngine::TextInversionState inverted = ThemeEngine::kTextInversionNone;
|
||||
|
||||
// Draw the selected item inverted, on a highlighted background.
|
||||
if (_selectedItem == pos)
|
||||
inverted = true;
|
||||
if (_selectedItem == pos) {
|
||||
if (_hasFocus)
|
||||
inverted = ThemeEngine::kTextInversionFocus;
|
||||
else
|
||||
inverted = ThemeEngine::kTextInversion;
|
||||
}
|
||||
|
||||
Common::Rect r(getEditRect());
|
||||
int pad = _leftPadding;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue