mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-31 08:37:26 +00:00
Use color theme in Hexdump
This commit is contained in:
parent
0195806cfe
commit
ec4d11f9c0
@ -44,6 +44,7 @@ HexdumpWidget::HexdumpWidget(QWidget *parent, Qt::WindowFlags flags) :
|
||||
ui->asciiHeaderLabel->setContentsMargins(margin, 0, margin, 0);
|
||||
|
||||
setupFonts();
|
||||
colorsUpdatedSlot();
|
||||
updateHeaders();
|
||||
|
||||
// Set hexdump context menu
|
||||
@ -60,6 +61,7 @@ HexdumpWidget::HexdumpWidget(QWidget *parent, Qt::WindowFlags flags) :
|
||||
connectScroll(false);
|
||||
|
||||
connect(Config(), SIGNAL(fontsUpdated()), this, SLOT(fontsUpdated()));
|
||||
connect(Config(), SIGNAL(colorsUpdated()), this, SLOT(colorsUpdatedSlot()));
|
||||
|
||||
connect(Core(), SIGNAL(seekChanged(RVA)), this, SLOT(on_seekChanged(RVA)));
|
||||
connect(Core(), SIGNAL(raisePrioritizedMemoryWidget(CutterCore::MemoryWidgetType)), this, SLOT(raisePrioritizedMemoryWidget(CutterCore::MemoryWidgetType)));
|
||||
@ -716,6 +718,17 @@ void HexdumpWidget::fontsUpdated()
|
||||
adjustHexdumpLines();
|
||||
}
|
||||
|
||||
void HexdumpWidget::colorsUpdatedSlot()
|
||||
{
|
||||
QString styleSheet = QString("QPlainTextEdit { background-color: %1; color: %2; }")
|
||||
.arg(ConfigColor("gui.background").name())
|
||||
.arg(ConfigColor("btext").name());
|
||||
|
||||
ui->hexOffsetText->setStyleSheet(styleSheet);
|
||||
ui->hexHexText->setStyleSheet(styleSheet);
|
||||
ui->hexASCIIText->setStyleSheet(styleSheet);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Actions callback functions
|
||||
|
@ -106,6 +106,7 @@ private slots:
|
||||
void adjustHexdumpLines();
|
||||
|
||||
void fontsUpdated();
|
||||
void colorsUpdatedSlot();
|
||||
|
||||
void on_codeCombo_2_currentTextChanged(const QString &arg1);
|
||||
void on_hexSideTab_2_currentChanged(int index);
|
||||
|
Loading…
Reference in New Issue
Block a user