mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 11:26:11 +00:00
Colorize the preview tooltip in the DisassemblyWidget according to th… (#2799)
This commit is contained in:
parent
c205acd773
commit
29cce01e1a
@ -22,6 +22,8 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
|
||||
static const int kMaxTooltipWidth = 400;
|
||||
|
||||
class DisassemblyTextBlockUserData : public QTextBlockUserData
|
||||
{
|
||||
public:
|
||||
@ -765,6 +767,14 @@ void DisassemblyWidget::setupColors()
|
||||
mDisasTextEdit->setStyleSheet(QString("QPlainTextEdit { background-color: %1; color: %2; }")
|
||||
.arg(ConfigColor("gui.background").name())
|
||||
.arg(ConfigColor("btext").name()));
|
||||
|
||||
// Read and set a stylesheet for the QToolTip too
|
||||
setStyleSheet(QString{"QToolTip { border-width: 1px; max-width: %1px;"
|
||||
"opacity: 230; background-color: %2;"
|
||||
"color: %3; border-color: %3;}"}
|
||||
.arg(kMaxTooltipWidth)
|
||||
.arg(Config()->getColor("gui.tooltip.background").name())
|
||||
.arg(Config()->getColor("gui.tooltip.foreground").name()));
|
||||
}
|
||||
|
||||
DisassemblyScrollArea::DisassemblyScrollArea(QWidget *parent) : QAbstractScrollArea(parent) {}
|
||||
|
Loading…
Reference in New Issue
Block a user