This commit is contained in:
曹梦轩 2025-04-24 20:15:21 +08:00 committed by GitHub
commit 2a611279aa
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 9 additions and 4 deletions

View File

@ -1,5 +1,6 @@
TEMPLATE = lib TEMPLATE = lib
CONFIG += staticlib CONFIG += staticlib
QT += statemachine
SOURCES = \ SOURCES = \
qtmaterialavatar.cpp \ qtmaterialavatar.cpp \
lib/qtmaterialstyle.cpp \ lib/qtmaterialstyle.cpp \

View File

@ -33,7 +33,7 @@ void QtMaterialTabsPrivate::QtMaterialTabsPrivate::init()
q->setStyle(&QtMaterialStyle::instance()); q->setStyle(&QtMaterialStyle::instance());
tabLayout->setSpacing(0); tabLayout->setSpacing(0);
tabLayout->setMargin(0); tabLayout->setContentsMargins(0, 0, 0, 0);
} }
/*! /*!

View File

@ -12,7 +12,11 @@ AppBarSettingsEditor::AppBarSettingsEditor(QWidget *parent)
{ {
QLabel *label = new QLabel("Inbox"); QLabel *label = new QLabel("Inbox");
label->setAttribute(Qt::WA_TranslucentBackground); label->setAttribute(Qt::WA_TranslucentBackground);
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
label->setForegroundRole(QPalette::WindowText);
#else
label->setForegroundRole(QPalette::Foreground); label->setForegroundRole(QPalette::Foreground);
#endif
label->setContentsMargins(6, 0, 0, 0); label->setContentsMargins(6, 0, 0, 0);
QPalette palette = label->palette(); QPalette palette = label->palette();

View File

@ -1,4 +1,4 @@
QT += core gui widgets QT += core gui widgets statemachine
TEMPLATE = app TEMPLATE = app
CONFIG += c++11 CONFIG += c++11
SOURCES = mainwindow.cpp \ SOURCES = mainwindow.cpp \

View File

@ -47,7 +47,7 @@ RadioButtonSettingsEditor::RadioButtonSettingsEditor(QWidget *parent)
layout->setAlignment(Qt::AlignCenter); layout->setAlignment(Qt::AlignCenter);
layout->setMargin(0); layout->setContentsMargins(0, 0, 0, 0);
layout->setSpacing(0); layout->setSpacing(0);
setupForm(); setupForm();

View File

@ -1,4 +1,4 @@
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets statemachine
TARGET = qt-material-widgets TARGET = qt-material-widgets
TEMPLATE = subdirs TEMPLATE = subdirs