Merge pull request #3208 from shocoman/disasm-popup-border
Dark theme: fix several visibility issues
This commit is contained in:
commit
02c762ff4a
|
@ -196,9 +196,9 @@ QMenuBar::item:disabled:selected {
|
|||
}
|
||||
|
||||
QMenu {
|
||||
border: 1px solid #212121;
|
||||
border: 1px solid #808080;
|
||||
color: #e0e0e0;
|
||||
margin: 2px;
|
||||
padding: 2px;
|
||||
}
|
||||
|
||||
QMenu::icon {
|
||||
|
@ -281,7 +281,7 @@ QMenu::right-arrow {
|
|||
}
|
||||
|
||||
QWidget:disabled {
|
||||
color: #454545;
|
||||
color: #646464;
|
||||
background-color: #212121;
|
||||
}
|
||||
|
||||
|
@ -313,6 +313,11 @@ QLineEdit {
|
|||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
/* e.g. "System breakpoint scripts" dialog */
|
||||
QLineEdit:disabled {
|
||||
background-color: #282828;
|
||||
}
|
||||
|
||||
QAbstractItemView QLineEdit {
|
||||
padding: 0;
|
||||
}
|
||||
|
@ -501,7 +506,7 @@ QMainWindow::separator:hover {
|
|||
|
||||
QMenu::separator {
|
||||
height: 1px;
|
||||
background-color: #2a2b2f;
|
||||
background-color: #808080;
|
||||
color: white;
|
||||
padding-left: 4px;
|
||||
margin-left: 10px;
|
||||
|
@ -550,7 +555,7 @@ QPushButton {
|
|||
color: #e0e0e0;
|
||||
background-color: #212121;
|
||||
border-width: 1px;
|
||||
border-color: #2a2b2f;
|
||||
border-color: #808080;
|
||||
border-style: solid;
|
||||
padding: 5px;
|
||||
border-radius: 2px;
|
||||
|
@ -567,7 +572,7 @@ QPushButton:disabled {
|
|||
padding-left: 10px;
|
||||
padding-right: 10px;
|
||||
border-radius: 2px;
|
||||
color: #454545;
|
||||
color: #646464;
|
||||
}
|
||||
|
||||
QPushButton:focus {
|
||||
|
@ -581,11 +586,11 @@ QPushButton:pressed {
|
|||
padding-bottom: -17px;
|
||||
}
|
||||
|
||||
QComboBox {
|
||||
QComboBox, QFontComboBox {
|
||||
selection-background-color: #89a2f6;
|
||||
selection-color: #000000;
|
||||
border-style: solid;
|
||||
border: 1px solid #212121;
|
||||
border: 1px solid #424242;
|
||||
border-radius: 2px;
|
||||
padding: 5px;
|
||||
min-width: 75px;
|
||||
|
@ -596,15 +601,19 @@ QPushButton:checked {
|
|||
border-color: #2a2b2f;
|
||||
}
|
||||
|
||||
QPushButton:hover {
|
||||
border: 1px solid #e0e0e0;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
QComboBox:hover,
|
||||
QPushButton:hover,
|
||||
QAbstractSpinBox:hover,
|
||||
QLineEdit:hover,
|
||||
QTextEdit:hover,
|
||||
QPlainTextEdit:hover,
|
||||
QAbstractView:hover,
|
||||
QTreeView:hover {
|
||||
border: 1px solid #414141;
|
||||
border: 1px solid #646464;
|
||||
color: #e0e0e0;
|
||||
}
|
||||
|
||||
|
@ -619,6 +628,7 @@ QComboBox QAbstractItemView {
|
|||
border-radius: 2px;
|
||||
border: 1px solid #212121;
|
||||
selection-background-color: #414141;
|
||||
selection-color: #ffffff; /* e.g. calling convention ComboBox */
|
||||
}
|
||||
|
||||
QComboBox::drop-down {
|
||||
|
@ -1097,3 +1107,12 @@ QTabBar::tear {
|
|||
width: 0px;
|
||||
border: none;
|
||||
}
|
||||
|
||||
/* e.g. "Exception filters" list, "Patch file" modules list, "Set page memory rights" table, "Select font" list, etc */
|
||||
QTableView, QListView {
|
||||
selection-color: #c8c8c8;
|
||||
}
|
||||
|
||||
DisassemblyPopup {
|
||||
border: 1px solid #c0c0c0;
|
||||
}
|
||||
|
|
|
@ -51,7 +51,7 @@ DisassemblyCommentColor=#E0E0E0
|
|||
DisassemblyConditionalJumpLineFalseColor=#808080
|
||||
DisassemblyConditionalJumpLineTrueColor=#AA0000
|
||||
DisassemblyFunctionColor=#F88478
|
||||
DisassemblyHardwareBreakpointBackgroundColor=#XXXXXX
|
||||
DisassemblyHardwareBreakpointBackgroundColor=#000000
|
||||
DisassemblyHardwareBreakpointColor=#E6E976
|
||||
DisassemblyLabelBackgroundColor=#XXXXXX
|
||||
DisassemblyLabelColor=#B794F6
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#include "StringUtil.h"
|
||||
#include "MiscUtil.h"
|
||||
#include <QPainter>
|
||||
#include <QStyleOptionFrame>
|
||||
|
||||
DisassemblyPopup::DisassemblyPopup(QWidget* parent) :
|
||||
QFrame(parent, Qt::Tool | Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint | Qt::WindowDoesNotAcceptFocus),
|
||||
|
@ -84,6 +85,13 @@ void DisassemblyPopup::paintEvent(QPaintEvent* event)
|
|||
RichTextPainter::paintRichText(&p, 3, y, mWidth - 3, charHeight, 0, instruction.first, mFontMetrics);
|
||||
y += charHeight;
|
||||
}
|
||||
|
||||
// The code above will destroy the stylesheet adjustments, making it impossible to change the border color.
|
||||
// To remedy this, we redraw a thin 'stylizable' frame here
|
||||
QStyleOptionFrame opt;
|
||||
initStyleOption(&opt);
|
||||
style()->drawPrimitive(QStyle::PE_Frame, &opt, &p, this);
|
||||
|
||||
QFrame::paintEvent(event);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue