Skip to content
/ okteta Public
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: KDE/okteta
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: kermitfrog/okteta
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Can’t automatically merge. Don’t worry, you can still create the pull request.
  • 1 commit
  • 2 files changed
  • 1 contributor

Commits on Dec 15, 2020

  1. Copy the full SHA
    c9e6d0a View commit details
Showing with 18 additions and 8 deletions.
  1. +2 −0 gui/abstractbytearraycolumnrenderer_p.cpp
  2. +16 −8 gui/abstractbytearrayview_p.cpp
2 changes: 2 additions & 0 deletions gui/abstractbytearraycolumnrenderer_p.cpp
Original file line number Diff line number Diff line change
@@ -716,6 +716,8 @@ void AbstractByteArrayColumnRendererPrivate::renderCursor(QPainter* painter, Add
mByteTypeColored ? foregroundRoleForChar(byteChar) : KColorScheme::NormalText;
const QBrush brush = colorScheme.foreground(foregroundRole);
painter->fillRect(0, 0, mByteWidth, q->lineHeight(), brush);
const QColor& charColor = colorScheme.background(KColorScheme::NormalBackground).color();
renderByteText(painter, byte, byteChar, charColor);
}

bool AbstractByteArrayColumnRendererPrivate::getNextSelectedAddressRange(AddressRange* _selection, unsigned int* _flag,
24 changes: 16 additions & 8 deletions gui/abstractbytearrayview_p.cpp
Original file line number Diff line number Diff line change
@@ -195,10 +195,14 @@ void AbstractByteArrayViewPrivate::init()

setWheelController(mZoomWheelController);

mCursorBlinkTimer = new QTimer(q);

QObject::connect(mCursorBlinkTimer, &QTimer::timeout,
q, [&]() { blinkCursor(); });
if (QApplication::cursorFlashTime() > 0) {
mCursorBlinkTimer = new QTimer(q);
QObject::connect(mCursorBlinkTimer, &QTimer::timeout,
q, [&]() { blinkCursor(); });
} else {
mCursorBlinkTimer = nullptr;
QObject::connect(q, &AbstractByteArrayView::cursorPositionChanged, q, [&]() { updateCursors();});
}

q->setAcceptDrops(true);
}
@@ -1005,12 +1009,16 @@ void AbstractByteArrayViewPrivate::startCursor()

updateCursors();

mCursorBlinkTimer->start(QApplication::cursorFlashTime() / 2);
if (mCursorBlinkTimer != nullptr) {
mCursorBlinkTimer->start(QApplication::cursorFlashTime() / 2);
}
}

void AbstractByteArrayViewPrivate::stopCursor()
void AbstractByteArrayViewPrivate::stopCursor()
{
mCursorBlinkTimer->stop();
if (mCursorBlinkTimer != nullptr) {
mCursorBlinkTimer->stop();
}

pauseCursor();
}
@@ -1019,7 +1027,7 @@ void AbstractByteArrayViewPrivate::unpauseCursor()
{
mCursorPaused = false;

if (mCursorBlinkTimer->isActive()) {
if (mCursorBlinkTimer != nullptr && mCursorBlinkTimer->isActive()) {
updateCursors();
}
}