dark works
This commit is contained in:
@@ -54,6 +54,7 @@ QCodeEdit::QCodeEdit(QWidget * parent): QWidget(parent), ui(new Ui::QCodeEdit) {
|
|||||||
qRegisterMetaType<QTextCursor>();
|
qRegisterMetaType<QTextCursor>();
|
||||||
qRegisterMetaType<QCodeEdit::ACEntry>();
|
qRegisterMetaType<QCodeEdit::ACEntry>();
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
|
detectTheme();
|
||||||
overlay = new _QCE_Viewport(ui->textCode->viewport());
|
overlay = new _QCE_Viewport(ui->textCode->viewport());
|
||||||
overlay->ce = this;
|
overlay->ce = this;
|
||||||
overlay->show();
|
overlay->show();
|
||||||
@@ -879,8 +880,8 @@ void QCodeEdit::highlightBrackets() {
|
|||||||
|
|
||||||
QColor inverseColorValue(const QColor & c) {
|
QColor inverseColorValue(const QColor & c) {
|
||||||
int hsv[4];
|
int hsv[4];
|
||||||
c.getHsv(&hsv[0], &hsv[1], &hsv[2], &hsv[3]);
|
c.getHsl(&hsv[0], &hsv[1], &hsv[2], &hsv[3]);
|
||||||
return QColor::fromHsv(hsv[0], hsv[1], 255 - hsv[2], hsv[3]);
|
return QColor::fromHsl(hsv[0], hsv[1], 255 - hsv[2], hsv[3]);
|
||||||
}
|
}
|
||||||
QBrush QCodeEdit::invertedBrush(const QBrush & b) {
|
QBrush QCodeEdit::invertedBrush(const QBrush & b) {
|
||||||
auto ret = b;
|
auto ret = b;
|
||||||
|
|||||||
Reference in New Issue
Block a user