diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteAddressItem.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteAddressItem.cpp index c1862ed5..dc17d545 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteAddressItem.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteAddressItem.cpp @@ -6,6 +6,10 @@ using namespace Bloom::Widgets; void ByteAddressItem::setAddressHex(const QString& addressHex) { + this->setCacheMode( + QGraphicsItem::CacheMode::ItemCoordinateCache, + QSize(ByteAddressItem::WIDTH, ByteAddressItem::HEIGHT) + ); this->addressHex = addressHex; } @@ -13,13 +17,10 @@ void ByteAddressItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* o painter->setRenderHints(QPainter::RenderHint::Antialiasing | QPainter::RenderHint::SmoothPixmapTransform, true); static const auto widgetRect = this->boundingRect(); - auto fontColor = QColor(0x8F, 0x91, 0x92); - static auto font = painter->font(); + static auto fontColor = QColor(0x8F, 0x91, 0x92); + static auto font = QFont("'Ubuntu', sans-serif"); font.setPixelSize(12); - - if (!this->isEnabled()) { - fontColor.setAlpha(100); - } + fontColor.setAlpha(!this->isEnabled() ? 100 : 255); painter->setFont(font); painter->setPen(fontColor); diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItem.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItem.cpp index ac1dbe28..b1d6c477 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItem.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/ByteItem.cpp @@ -19,6 +19,10 @@ address(address), hoveredByteItem(hoveredByteItem), settings(settings) { + this->setCacheMode( + QGraphicsItem::CacheMode::ItemCoordinateCache, + QSize(ByteItem::WIDTH, ByteItem::HEIGHT) + ); this->setAcceptHoverEvents(true); this->addressHex = "0x" + QString::number(this->address, 16).rightJustified(8, '0').toUpper(); @@ -45,11 +49,15 @@ void ByteItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, static const auto widgetRect = this->boundingRect(); static const auto standardTextColor = QColor(0xAF, 0xB1, 0xB3); static const auto valueChangedTextColor = QColor(0x54, 0x7F, 0xBA); + static auto font = QFont("'Ubuntu', sans-serif"); static const auto stackMemoryBackgroundColor = QColor(0x5E, 0x50, 0x27, 255); static const auto hoveredBackgroundColor = QColor(0x8E, 0x8B, 0x83, 70); static const auto hoveredNeighbourBackgroundColor = QColor(0x8E, 0x8B, 0x83, 30); + font.setPixelSize(11); + painter->setFont(font); + if (this->settings.highlightStackMemory && this->settings.stackPointerAddress.has_value() && this->address > this->settings.stackPointerAddress ) {