简短文件名

This commit is contained in:
xu
2026-09-09 17:14:31 +08:00
parent 40473ad10b
commit bc17390d83
96 changed files with 79 additions and 79 deletions
+26
View File
@@ -0,0 +1,26 @@
#include "base.h"
#include <QLabel>
#include <QPushButton>
BasePage::BasePage(AppContext* ctx, QWidget* parent)
: QWidget(parent), m_ctx(ctx)
{
setObjectName("pageRoot");
setStyleSheet(QString("QWidget#pageRoot{background-color:%1;}").arg(C::BG));
}
QLabel* BasePage::label(const QString& text, int px, const QString& color, bool bold, QWidget* parent)
{
QLabel* l = new QLabel(text, parent);
l->setStyleSheet(QString("color:%1;font-size:%2px;%3").arg(color).arg(px)
.arg(bold ? "font-weight:700;" : ""));
return l;
}
QPushButton* BasePage::button(const QString& text, const QString& variant, QWidget* parent)
{
QPushButton* b = new QPushButton(text, parent);
if (!variant.isEmpty())
b->setProperty("variant", variant);
return b;
}