mirror of https://github.com/stella-emu/stella.git
some small darkened color touches
This commit is contained in:
parent
f3927b94c4
commit
a1bc2460bb
|
@ -596,7 +596,7 @@ void DataGridWidget::drawWidget(bool hilite)
|
|||
bool onTop = _boss->dialog().isOnTop();
|
||||
int row, col;
|
||||
|
||||
s.fillRect(_x, _y, _w, _h, hilite && isEnabled() && isEditable() ? _bgcolorhi : onTop ? _bgcolor : _bgcolorlo);
|
||||
s.fillRect(_x, _y, _w, _h, hilite && isEnabled() && isEditable() ? _bgcolorhi : onTop ? _bgcolor : kBGColorHi);
|
||||
// Draw the internal grid and labels
|
||||
int linewidth = _cols * _colWidth;
|
||||
s.frameRect(_x, _y, _w, _h, hilite && isEnabled() && isEditable() ? kWidColorHi : kColor);
|
||||
|
|
|
@ -90,6 +90,7 @@ void DelayQueueWidget::loadConfig() {
|
|||
void DelayQueueWidget::drawWidget(bool hilite)
|
||||
{
|
||||
FBSurface& surface = _boss->dialog().surface();
|
||||
bool onTop = _boss->dialog().isOnTop();
|
||||
|
||||
int y = _y,
|
||||
x = _x,
|
||||
|
@ -101,14 +102,14 @@ void DelayQueueWidget::drawWidget(bool hilite)
|
|||
y += 1;
|
||||
x += 1;
|
||||
w -= 1;
|
||||
surface.fillRect(x, y, w - 1, _h - 2, kDlgColor);
|
||||
surface.fillRect(x, y, w - 1, _h - 2, onTop ? kDlgColor : _bgcolorlo);
|
||||
|
||||
y += 2;
|
||||
x += 2;
|
||||
w -= 3;
|
||||
|
||||
for (const auto& line : myLines) {
|
||||
surface.drawString(_font, line, x, y, w, _textcolor);
|
||||
surface.drawString(_font, line, x, y, w, onTop ? _textcolor : kColor);
|
||||
y += lineHeight;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -869,6 +869,7 @@ void PromptWidget::drawCaret()
|
|||
{
|
||||
//cerr << "PromptWidget::drawCaret()\n";
|
||||
FBSurface& s = _boss->dialog().surface();
|
||||
bool onTop = _boss->dialog().isOnTop();
|
||||
|
||||
int line = _currentPos / _lineWidth;
|
||||
|
||||
|
@ -881,7 +882,7 @@ void PromptWidget::drawCaret()
|
|||
int y = _y + displayLine * _kConsoleLineHeight;
|
||||
|
||||
char c = buffer(_currentPos);
|
||||
s.fillRect(x, y, _kConsoleCharWidth, _kConsoleLineHeight, kTextColor);
|
||||
s.fillRect(x, y, _kConsoleCharWidth, _kConsoleLineHeight, onTop ? kTextColor : kColor);
|
||||
s.drawChar(_font, c, x, y + 2, kBGColor);
|
||||
}
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ ToggleBitWidget::ToggleBitWidget(GuiObject* boss, const GUI::Font& font,
|
|||
{
|
||||
_rowHeight = font.getLineHeight();
|
||||
_colWidth = colchars * font.getMaxCharWidth() + 8;
|
||||
_bgcolorlo = kDlgColor;
|
||||
|
||||
// Make sure all lists contain some default values
|
||||
int size = _rows * _cols;
|
||||
|
@ -116,17 +117,17 @@ void ToggleBitWidget::drawWidget(bool hilite)
|
|||
if(_changedList[pos])
|
||||
{
|
||||
s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1,
|
||||
onTop ? uInt32(kDbgChangedColor) : _bgcolorlo);
|
||||
onTop ? kDbgChangedColor : _bgcolorlo);
|
||||
s.drawString(_font, buffer, x, y, _colWidth, onTop ? kDbgChangedTextColor : kColor);
|
||||
}
|
||||
else
|
||||
s.drawString(_font, buffer, x, y, _colWidth,
|
||||
onTop ? textColor : uInt32(kColor));
|
||||
onTop ? textColor : kColor);
|
||||
}
|
||||
else
|
||||
{
|
||||
s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, kBGColorHi);
|
||||
s.drawString(_font, buffer, x, y, _colWidth, kTextColor);
|
||||
s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1, onTop ? kBGColorHi : kDlgColor);
|
||||
s.drawString(_font, buffer, x, y, _colWidth, onTop ? kTextColor : kColor);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -121,6 +121,7 @@ void TogglePixelWidget::drawWidget(bool hilite)
|
|||
{
|
||||
//cerr << "TogglePixelWidget::drawWidget\n";
|
||||
FBSurface& s = dialog().surface();
|
||||
bool onTop = _boss->dialog().isOnTop();
|
||||
int row, col;
|
||||
|
||||
s.frameRect(_x, _y, _w, _h, hilite && isEnabled() && isEditable() ? kWidColorHi : kColor);
|
||||
|
@ -148,7 +149,7 @@ void TogglePixelWidget::drawWidget(bool hilite)
|
|||
|
||||
// Either draw the pixel in given color, or erase (show background)
|
||||
s.fillRect(x - 3, y - 1, _colWidth-1, _rowHeight-1,
|
||||
_stateList[pos] ? _pixelColor : _backgroundColor);
|
||||
_stateList[pos] ? onTop ? _pixelColor : kColor : onTop ? _backgroundColor : kBGColorLo);
|
||||
if (_changedList[pos])
|
||||
s.frameRect(x - 3, y - 1, _colWidth - 1, _rowHeight - 1, kDbgChangedColor);
|
||||
}
|
||||
|
|
|
@ -52,7 +52,7 @@ void ColorWidget::drawWidget(bool hilite)
|
|||
s.frameRect(_x, _y, _w, _h + 1, kColor);
|
||||
|
||||
// Show the currently selected color
|
||||
s.fillRect(_x+1, _y+1, _w-2, _h-1, onTop ? isEnabled() ? _color : kWidColor : kDlgColor);
|
||||
s.fillRect(_x+1, _y+1, _w-2, _h-1, onTop ? isEnabled() ? _color : kWidColor : kBGColorLo);
|
||||
|
||||
// Cross out the grid?
|
||||
if(_crossGrid)
|
||||
|
|
|
@ -261,14 +261,18 @@ void ScrollBarWidget::drawWidget(bool hilite)
|
|||
// Up arrow
|
||||
if(hilite && _part == kUpArrowPart)
|
||||
s.fillRect(_x + 1, _y + 1, _w - 2, UP_DOWN_BOX_HEIGHT - 2, kScrollColor);
|
||||
s.drawBitmap(up_arrow, _x+4, _y+5, isSinglePage ? kColor :
|
||||
(hilite && _part == kUpArrowPart) ? kWidColor : kTextColor, 8);
|
||||
s.drawBitmap(up_arrow, _x+4, _y+5,
|
||||
onTop
|
||||
? isSinglePage ? kColor : (hilite && _part == kUpArrowPart) ? kWidColor : kTextColor
|
||||
: kColor, 8);
|
||||
|
||||
// Down arrow
|
||||
if(hilite && _part == kDownArrowPart)
|
||||
s.fillRect(_x + 1, bottomY - UP_DOWN_BOX_HEIGHT + 1, _w - 2, UP_DOWN_BOX_HEIGHT - 2, kScrollColor);
|
||||
s.drawBitmap(down_arrow, _x+4, bottomY - UP_DOWN_BOX_HEIGHT + 5, isSinglePage ? kColor :
|
||||
(hilite && _part == kDownArrowPart) ? kWidColor : kTextColor, 8);
|
||||
s.drawBitmap(down_arrow, _x+4, bottomY - UP_DOWN_BOX_HEIGHT + 5,
|
||||
onTop
|
||||
? isSinglePage ? kColor : (hilite && _part == kDownArrowPart) ? kWidColor : kTextColor
|
||||
: kColor, 8);
|
||||
|
||||
// Slider
|
||||
if(!isSinglePage)
|
||||
|
|
Loading…
Reference in New Issue