From 8c0b2122070874fde8789155c8161934c1aadf2b Mon Sep 17 00:00:00 2001 From: thrust26 Date: Fri, 26 Jan 2018 12:55:05 +0100 Subject: [PATCH] Overlapped dialogs are (partially) toned down --- src/emucore/FrameBuffer.cxx | 10 +++++----- src/emucore/FrameBufferConstants.hxx | 2 ++ src/gui/Dialog.cxx | 5 +++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/emucore/FrameBuffer.cxx b/src/emucore/FrameBuffer.cxx index 3fc577770..296e7be1e 100644 --- a/src/emucore/FrameBuffer.cxx +++ b/src/emucore/FrameBuffer.cxx @@ -1017,8 +1017,8 @@ void FrameBuffer::VideoModeList::setZoom(uInt32 zoom) kDbgColorRed Red color in debugger *** Other colors *** kColorInfo TIA output position color - kTitleBarColor Title bar color - kTitleTextColor Title text color + kColorTitleBar Title bar color + kColorTitleText Title text color */ uInt32 FrameBuffer::ourGUIColors[3][kNumColors-256] = { // Standard @@ -1030,7 +1030,7 @@ uInt32 FrameBuffer::ourGUIColors[3][kNumColors-256] = { 0xac3410, 0xd55941, // scrollbar 0xac3410, 0xd55941, // slider 0xc80000, 0x00ff00, 0xc8c8ff, 0xc80000, // debugger - 0xffffff, 0xac3410, 0xf0f0cf // other + 0xffffff, 0xac3410, 0xf0f0cf, 0x686868, 0xdccfa5 // other }, // Classic { 0x686868, 0x000000, 0x404040, 0x404040, 0x404040, // base @@ -1041,7 +1041,7 @@ uInt32 FrameBuffer::ourGUIColors[3][kNumColors-256] = { 0x20a020, 0x00ff00, // scrollbar 0x20a020, 0x00ff00, // slider 0xc80000, 0x00ff00, 0xc8c8ff, 0xc80000, // debugger - 0x20a020, 0x20a020, 0x000000 // other + 0x20a020, 0x20a020, 0x000000, 0x686868, 0x404040 // other }, // Light { 0x808080, 0x000000, 0xc0c0c0, 0xe1e1e1, 0x333333, // base @@ -1052,6 +1052,6 @@ uInt32 FrameBuffer::ourGUIColors[3][kNumColors-256] = { 0xc0c0c0, 0x808080, // scrollbar 0x333333, 0x0078d7, // slider 0xffc0c0, 0x000000, 0xe00000, 0xc00000, // debugger - 0xffffff, 0x808080, 0xffffff // other + 0xffffff, 0x333333, 0xf0f0f0, 0x808080, 0xc0c0c0 // other } }; diff --git a/src/emucore/FrameBufferConstants.hxx b/src/emucore/FrameBufferConstants.hxx index 4066fac5c..3c7f03fa8 100644 --- a/src/emucore/FrameBufferConstants.hxx +++ b/src/emucore/FrameBufferConstants.hxx @@ -73,6 +73,8 @@ enum { kColorInfo, kColorTitleBar, kColorTitleText, + kColorTitleBarLo, + kColorTitleTextLo, kNumColors }; diff --git a/src/gui/Dialog.cxx b/src/gui/Dialog.cxx index 8da77b9ec..70b0bbb49 100644 --- a/src/gui/Dialog.cxx +++ b/src/gui/Dialog.cxx @@ -314,15 +314,16 @@ void Dialog::drawDialog() if(!isVisible()) return; + FBSurface& s = surface(); + if(_dirty) { - FBSurface& s = surface(); bool onTop = parent().myDialogStack.top() == this; if(_flags & WIDGET_CLEARBG) { // cerr << "Dialog::drawDialog(): w = " << _w << ", h = " << _h << " @ " << &s << endl << endl; - s.fillRect(_x, _y + _th, _w, _h - _th, kDlgColor); + s.fillRect(_x, _y + _th, _w, _h - _th, onTop ? kDlgColor : kBGColorLo); if(_th) { s.fillRect(_x, _y, _w, _th, onTop ? kColorTitleBar : kColorTitleBarLo);