mirror of
https://github.com/YACReader/yacreader
synced 2025-05-28 03:10:27 -04:00
Use ints for colors instead of string literals
This commit is contained in:
parent
d8cb61314d
commit
cc927de7de
@ -85,7 +85,7 @@ BookmarksDialog::BookmarksDialog(QWidget *parent)
|
||||
|
||||
QPalette Pal(palette());
|
||||
// set black background
|
||||
Pal.setColor(QPalette::Background, QColor("#454545"));
|
||||
Pal.setColor(QPalette::Background, QColor(0x454545));
|
||||
this->setAutoFillBackground(true);
|
||||
this->setPalette(Pal);
|
||||
|
||||
|
@ -93,7 +93,7 @@ GoToFlowToolBar::GoToFlowToolBar(QWidget *parent)
|
||||
void GoToFlowToolBar::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QPainter painter(this);
|
||||
painter.fillRect(0, 0, width(), height(), QColor("#99000000"));
|
||||
painter.fillRect(0, 0, width(), height(), QColor(0x99000000));
|
||||
}
|
||||
|
||||
void GoToFlowToolBar::setPage(int pageNumber)
|
||||
|
@ -47,7 +47,7 @@ void NotificationsLabelWidget::paintEvent(QPaintEvent *)
|
||||
QPainterPath path;
|
||||
path.addRoundedRect(QRectF(0, 0, width(), height()), 5.0, 5.0);
|
||||
painter.setPen(Qt::NoPen);
|
||||
painter.fillPath(path, QColor("#BB000000"));
|
||||
painter.fillPath(path, QColor(0xBB000000));
|
||||
painter.drawPath(path);
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ void PageLabelWidget::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QPainter painter(this);
|
||||
|
||||
painter.fillRect(0, 0, width(), height(), QColor("#BB000000"));
|
||||
painter.fillRect(0, 0, width(), height(), QColor(0xBB000000));
|
||||
}
|
||||
|
||||
void PageLabelWidget::updatePosition()
|
||||
|
@ -51,7 +51,7 @@ YACReaderTranslator::YACReaderTranslator(Viewer *parent)
|
||||
this->setAutoFillBackground(true);
|
||||
this->setBackgroundRole(QPalette::Window);
|
||||
QPalette p(this->palette());
|
||||
p.setColor(QPalette::Window, QColor("#404040"));
|
||||
p.setColor(QPalette::Window, QColor(0x404040));
|
||||
this->setPalette(p);
|
||||
|
||||
auto layout = new QVBoxLayout(this);
|
||||
|
@ -79,7 +79,7 @@ void YACReaderSlider::paintEvent(QPaintEvent *)
|
||||
{
|
||||
QPainter painter(this);
|
||||
|
||||
painter.fillRect(0, 0, width(), height(), QColor("#BB000000"));
|
||||
painter.fillRect(0, 0, width(), height(), QColor(0xBB000000));
|
||||
}
|
||||
|
||||
void YACReaderSlider::show()
|
||||
|
@ -59,7 +59,7 @@ QVariant ActionsShortcutsModel::data(const QModelIndex &index, int role) const
|
||||
}
|
||||
|
||||
if (role == Qt::ForegroundRole && index.column() == KEYS && actions[index.row()]->shortcut().isEmpty())
|
||||
return QBrush(QColor("#AAAAAA"));
|
||||
return QBrush(QColor(0xAAAAAA));
|
||||
|
||||
if (role != Qt::DisplayRole)
|
||||
return QVariant();
|
||||
|
Loading…
Reference in New Issue
Block a user