summaryrefslogtreecommitdiffstatshomepage
path: root/src/osd/modules/debugger/qt/debuggerview.cpp
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-01-30 22:46:43 +1100
committer Vas Crabb <vas@vastheman.com>2021-01-30 22:46:43 +1100
commit8d04ca7d7d307ca8f85624c571ccfd4eb23a26e0 (patch)
treea0bca1a22f519b9628c4c13efb339e834ec41295 /src/osd/modules/debugger/qt/debuggerview.cpp
parentfd3ca4668a6215f6821263742ac86a265f93c56e (diff)
Debuger updates:
* Improved behaviour of bottom line in Qt and win32 debugger views. * Ported memory tracking feature from Qt to win32 module.
Diffstat (limited to 'src/osd/modules/debugger/qt/debuggerview.cpp')
-rw-r--r--src/osd/modules/debugger/qt/debuggerview.cpp19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/osd/modules/debugger/qt/debuggerview.cpp b/src/osd/modules/debugger/qt/debuggerview.cpp
index fcbbda81f54..263fcfe1e73 100644
--- a/src/osd/modules/debugger/qt/debuggerview.cpp
+++ b/src/osd/modules/debugger/qt/debuggerview.cpp
@@ -66,11 +66,13 @@ void DebuggerView::paintEvent(QPaintEvent *event)
// Handle the scroll bars
int const horizontalScrollCharDiff = m_view->total_size().x - m_view->visible_size().x;
horizontalScrollBar()->setRange(0, (std::max)(0, horizontalScrollCharDiff));
+ horizontalScrollBar()->setPageStep(lineWidth - 1);
int const verticalScrollCharDiff = m_view->total_size().y - m_view->visible_size().y;
int const verticalScrollSize = (std::max)(0, verticalScrollCharDiff);
bool const atEnd = verticalScrollBar()->value() == verticalScrollBar()->maximum();
verticalScrollBar()->setRange(0, verticalScrollSize);
+ verticalScrollBar()->setPageStep((contentHeight / fontHeight) - 1);
if (m_preferBottom && atEnd)
verticalScrollBar()->setValue(verticalScrollSize);
@@ -147,9 +149,24 @@ void DebuggerView::paintEvent(QPaintEvent *event)
x * fontWidth,
y * fontHeight,
((x + width) < visibleCharDims.x) ? (width * fontWidth) : (contentWidth - (x * fontWidth)),
- ((y + 1) < visibleCharDims.y) ? fontHeight : (contentHeight - (y * fontHeight)),
+ fontHeight,
bgBrush);
+ if (((y + 1) == visibleCharDims.y) && (contentHeight > (visibleCharDims.y * fontHeight)))
+ {
+ if (textAttr & DCA_ANCILLARY)
+ bgColor.setRgb(0xe0, 0xe0, 0xe0);
+ else
+ bgColor.setRgb(0xff, 0xff, 0xff);
+ bgBrush.setColor(bgColor);
+ painter.fillRect(
+ x * fontWidth,
+ visibleCharDims.y * fontHeight,
+ ((x + width) < visibleCharDims.x) ? (width * fontWidth) : (contentWidth - (x * fontWidth)),
+ contentHeight - (visibleCharDims.y * fontHeight),
+ bgBrush);
+ }
+
// There is a touchy interplay between font height, drawing difference, visible position, etc
// Fonts don't get drawn "down and to the left" like boxes, so some wiggling is needed.
painter.drawText(x * fontWidth, (y * fontHeight + (fontHeight * 0.80)), text);