mirror of https://github.com/stella-emu/stella.git
some more UI polishing
This commit is contained in:
parent
dfca521bf9
commit
7f08d9b74c
|
@ -159,6 +159,9 @@ void TiaOutputWidget::drawWidget(bool hilite)
|
|||
height = instance().console().tia().height();
|
||||
FBSurface& s = dialog().surface();
|
||||
|
||||
s.vLine(_x + _w + 1, _y, height, kColor);
|
||||
s.hLine(_x, _y + height + 1, _x +_w + 1, kColor);
|
||||
|
||||
// Get current scanline position
|
||||
// This determines where the frame greying should start, and where a
|
||||
// scanline 'pointer' should be drawn
|
||||
|
@ -176,10 +179,14 @@ void TiaOutputWidget::drawWidget(bool hilite)
|
|||
*line_ptr++ = pixel;
|
||||
*line_ptr++ = pixel;
|
||||
}
|
||||
s.drawPixels(myLineBuffer, _x, _y+y, width << 1);
|
||||
s.drawPixels(myLineBuffer, _x + 1, _y + 1 + y, width << 1);
|
||||
}
|
||||
|
||||
uInt32 beamColor = kBtnTextColor;
|
||||
if(instance().settings().getString("uipalette") == "light")
|
||||
beamColor = kWidColor;
|
||||
|
||||
// Show electron beam position
|
||||
if(visible && scanx < width && scany+2u < height)
|
||||
s.fillRect(_x+(scanx<<1), _y+scany, 3, 3, kBtnTextColor);
|
||||
s.fillRect(_x + 1 + (scanx<<1), _y + 1 + scany, 3, 3, beamColor);
|
||||
}
|
||||
|
|
|
@ -242,7 +242,11 @@ void TiaZoomWidget::drawWidget(bool hilite)
|
|||
FBSurface& s = dialog().surface();
|
||||
|
||||
s.fillRect(_x+1, _y+1, _w-2, _h-2, kBGColor);
|
||||
#ifndef FLAT_UI
|
||||
s.box(_x, _y, _w, _h, kColor, kShadowColor);
|
||||
#else
|
||||
s.frameRect(_x, _y, _w, _h, kColor);
|
||||
#endif
|
||||
|
||||
// Draw the zoomed image
|
||||
// This probably isn't as efficient as it can be, but it's a small area
|
||||
|
@ -265,7 +269,11 @@ void TiaZoomWidget::drawWidget(bool hilite)
|
|||
{
|
||||
uInt32 idx = y*width + x;
|
||||
uInt32 color = currentFrame[idx] | (idx > scanoffset ? 1 : 0);
|
||||
#ifndef FLAT_UI
|
||||
s.fillRect(_x + col + 2, _y + row + 2, wzoom, hzoom, color);
|
||||
#else
|
||||
s.fillRect(_x + col + 1, _y + row + 1, wzoom, hzoom, color);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -460,8 +460,12 @@ inline void FrameBuffer::drawMessage()
|
|||
|
||||
myMsg.surface->setDstPos(myMsg.x + myImageRect.x(), myMsg.y + myImageRect.y());
|
||||
myMsg.surface->fillRect(1, 1, myMsg.w-2, myMsg.h-2, kBtnColor);
|
||||
#ifndef FLAT_UI
|
||||
myMsg.surface->box(0, 0, myMsg.w, myMsg.h, kColor, kShadowColor);
|
||||
myMsg.surface->drawString(font(), myMsg.text, 4, 4,
|
||||
#else
|
||||
myMsg.surface->frameRect(0, 0, myMsg.w, myMsg.h, kColor);
|
||||
#endif
|
||||
myMsg.surface->drawString(font(), myMsg.text, 5, 4,
|
||||
myMsg.w, myMsg.color, TextAlign::Left);
|
||||
|
||||
// Either erase the entire message (when time is reached),
|
||||
|
|
|
@ -329,7 +329,7 @@ void TabWidget::drawWidget(bool hilite)
|
|||
s.vLine(_x + _w - 2, _y + _tabHeight - 1, _y + _h - 2, kColor);
|
||||
s.vLine(_x + _w - 1, _y + _tabHeight - 1, _y + _h - 2, kShadowColor);
|
||||
#else
|
||||
s.hLine(right1, _y, left2, kScrollColorHi);
|
||||
s.hLine(right1, _y, left2 - 1, kScrollColorHi);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -90,7 +90,11 @@ class TabWidget : public Widget, public CommandSender
|
|||
bool _firstTime;
|
||||
|
||||
enum {
|
||||
#ifndef FLAT_UI
|
||||
kTabLeftOffset = 4,
|
||||
#else
|
||||
kTabLeftOffset = 0,
|
||||
#endif
|
||||
kTabSpacing = 2,
|
||||
kTabPadding = 3
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue