diff --git a/include/FramelessHelper/Core/framelesshelpercore_global.h b/include/FramelessHelper/Core/framelesshelpercore_global.h index 5e34151..9d34f48 100644 --- a/include/FramelessHelper/Core/framelesshelpercore_global.h +++ b/include/FramelessHelper/Core/framelesshelpercore_global.h @@ -161,6 +161,7 @@ Q_NAMESPACE_EXPORT(FRAMELESSHELPER_CORE_API) [[maybe_unused]] static constexpr const int kDefaultTitleBarHeight = 30; [[maybe_unused]] static constexpr const int kDefaultWindowFrameBorderThickness = 1; [[maybe_unused]] static constexpr const int kDefaultTitleBarFontPointSize = 11; +[[maybe_unused]] static constexpr const int kDefaultTitleBarTitleLabelMargin = 10; [[maybe_unused]] static constexpr const QColor kDefaultBlackColor = {0, 0, 0}; // #000000 [[maybe_unused]] static constexpr const QColor kDefaultWhiteColor = {255, 255, 255}; // #FFFFFF diff --git a/src/quick/CMakeLists.txt b/src/quick/CMakeLists.txt index 1b05529..5480d2e 100644 --- a/src/quick/CMakeLists.txt +++ b/src/quick/CMakeLists.txt @@ -22,8 +22,8 @@ SOFTWARE. ]] -find_package(QT NAMES Qt6 Qt5 COMPONENTS QuickTemplates2) -find_package(Qt${QT_VERSION_MAJOR} COMPONENTS QuickTemplates2) +find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS QuickTemplates2) +find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS QuickTemplates2) set(SUB_PROJ_NAME FramelessHelperQuick) diff --git a/src/quick/quickstandardtitlebar.cpp b/src/quick/quickstandardtitlebar.cpp index 3f74761..12963ea 100644 --- a/src/quick/quickstandardtitlebar.cpp +++ b/src/quick/quickstandardtitlebar.cpp @@ -83,19 +83,19 @@ void QuickStandardTitleBar::setTitleLabelAlignment(const Qt::Alignment value) const QQuickItemPrivate * const titleBarPriv = QQuickItemPrivate::get(this); if (m_labelAlignment & Qt::AlignTop) { labelAnchors->setTop(titleBarPriv->top()); - labelAnchors->setTopMargin(10); + labelAnchors->setTopMargin(kDefaultTitleBarTitleLabelMargin); } if (m_labelAlignment & Qt::AlignBottom) { labelAnchors->setBottom(titleBarPriv->bottom()); - labelAnchors->setBottomMargin(10); + labelAnchors->setBottomMargin(kDefaultTitleBarTitleLabelMargin); } if (m_labelAlignment & Qt::AlignLeft) { labelAnchors->setLeft(titleBarPriv->left()); - labelAnchors->setLeftMargin(10); + labelAnchors->setLeftMargin(kDefaultTitleBarTitleLabelMargin); } if (m_labelAlignment & Qt::AlignRight) { labelAnchors->setRight(QQuickItemPrivate::get(m_row.data())->left()); - labelAnchors->setRightMargin(10); + labelAnchors->setRightMargin(kDefaultTitleBarTitleLabelMargin); } if (m_labelAlignment & Qt::AlignVCenter) { labelAnchors->setTopMargin(0);