From 7f08d9b74c085d0f61d69837ac8936133ea2be14 Mon Sep 17 00:00:00 2001 From: thrust26 Date: Sun, 17 Dec 2017 13:28:23 +0100 Subject: [PATCH] some more UI polishing --- src/debugger/gui/TiaOutputWidget.cxx | 11 +++++++++-- src/debugger/gui/TiaZoomWidget.cxx | 8 ++++++++ src/emucore/FrameBuffer.cxx | 6 +++++- src/gui/TabWidget.cxx | 2 +- src/gui/TabWidget.hxx | 4 ++++ 5 files changed, 27 insertions(+), 4 deletions(-) diff --git a/src/debugger/gui/TiaOutputWidget.cxx b/src/debugger/gui/TiaOutputWidget.cxx index ddbf48d29..391713ba1 100644 --- a/src/debugger/gui/TiaOutputWidget.cxx +++ b/src/debugger/gui/TiaOutputWidget.cxx @@ -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); } diff --git a/src/debugger/gui/TiaZoomWidget.cxx b/src/debugger/gui/TiaZoomWidget.cxx index 4c9b93534..2633bb1e1 100644 --- a/src/debugger/gui/TiaZoomWidget.cxx +++ b/src/debugger/gui/TiaZoomWidget.cxx @@ -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 } } } diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index b432f646d..a6210a24c 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -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), diff --git a/src/gui/TabWidget.cxx b/src/gui/TabWidget.cxx index 22bd2ec13..aa9b1ef60 100644 --- a/src/gui/TabWidget.cxx +++ b/src/gui/TabWidget.cxx @@ -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 } diff --git a/src/gui/TabWidget.hxx b/src/gui/TabWidget.hxx index 8ca79abce..8cfabf436 100644 --- a/src/gui/TabWidget.hxx +++ b/src/gui/TabWidget.hxx @@ -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 };