35 lines
1.9 KiB
C
35 lines
1.9 KiB
C
#pragma once
|
|
#include <QApplication>
|
|
#include <QFont>
|
|
#include <QStyleFactory>
|
|
|
|
inline void applyAppearance(QApplication &app)
|
|
{
|
|
app.setStyle(QStyleFactory::create(QStringLiteral("Fusion")));
|
|
app.setFont(QFont(QStringLiteral("Microsoft YaHei UI"), 11));
|
|
app.setStyleSheet(QStringLiteral(
|
|
"QMainWindow { background: #f5f7fb; }"
|
|
"QLabel { color: #23364c; }"
|
|
"QLabel#titleLabel { font-size: 27px; font-weight: bold; color: #173b63; }"
|
|
"QLabel#subtitleLabel, QLabel#helpLabel { color: #52657a; }"
|
|
"QGroupBox { background: white; border: 1px solid #d6e0eb;"
|
|
" border-radius: 8px; margin-top: 12px; padding: 18px 12px 12px; }"
|
|
"QGroupBox::title { subcontrol-origin: margin; left: 12px; padding: 0 6px; }"
|
|
"QLineEdit, QSpinBox, QComboBox { min-height: 32px; padding: 3px 8px; }"
|
|
"QLineEdit, QSpinBox, QComboBox, QPlainTextEdit, QListWidget"
|
|
" { background: white; color: #23364c; }"
|
|
"QPushButton { min-height: 34px; padding: 4px 14px; }"
|
|
"QPushButton#convertButton, QPushButton#startButton, QPushButton#drawButton,"
|
|
" QPushButton#applyButton, QPushButton#groupsButton { background: #255c93;"
|
|
" color: white; border: 1px solid #255c93; border-radius: 5px; }"
|
|
"QPushButton:disabled, QPushButton#convertButton:disabled,"
|
|
" QPushButton#startButton:disabled, QPushButton#drawButton:disabled,"
|
|
" QPushButton#applyButton:disabled, QPushButton#groupsButton:disabled"
|
|
" { color: #8995a3; background: #e6ebf1; border-color: #d6e0eb; }"
|
|
"QLabel#statusLabel { color: #185376; }"
|
|
"QLineEdit#resultEdit { font-size: 23px; min-height: 45px; color: #175e53; }"
|
|
"QLabel#timeLabel { font: bold 76px 'Consolas'; color: #173b63; }"
|
|
"QProgressBar { border: 1px solid #d6e0eb; border-radius: 6px; height: 14px; }"
|
|
"QProgressBar::chunk { background: #2b8a7d; border-radius: 5px; }"));
|
|
}
|