From cf1b1e22377f376effa5c20eebb09cdbaeca5632 Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Tue, 19 Nov 2024 14:53:51 +0800 Subject: [PATCH] Unify definition of unified seach placeholder views fonts Signed-off-by: Claudio Cambra --- src/gui/tray/UnifiedSearchPlaceholderView.qml | 2 +- src/gui/tray/UnifiedSearchResultNothingFound.qml | 4 ++-- theme/Style/Style.qml | 2 ++ 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/gui/tray/UnifiedSearchPlaceholderView.qml b/src/gui/tray/UnifiedSearchPlaceholderView.qml index 10eb94af0489d..692f32c97e07d 100644 --- a/src/gui/tray/UnifiedSearchPlaceholderView.qml +++ b/src/gui/tray/UnifiedSearchPlaceholderView.qml @@ -37,7 +37,7 @@ ColumnLayout { EnforcedPlainTextLabel { text: qsTr("Start typing to search") - font.pixelSize: Style.subLinePixelSize * 1.25 + font.pixelSize: Style.unifiedSearchPlaceholderViewSublineFontPixelSize wrapMode: Text.Wrap Layout.fillWidth: true horizontalAlignment: Text.AlignHCenter diff --git a/src/gui/tray/UnifiedSearchResultNothingFound.qml b/src/gui/tray/UnifiedSearchResultNothingFound.qml index 175874e57aa39..1cab7fa5d1730 100644 --- a/src/gui/tray/UnifiedSearchResultNothingFound.qml +++ b/src/gui/tray/UnifiedSearchResultNothingFound.qml @@ -38,7 +38,7 @@ ColumnLayout { EnforcedPlainTextLabel { id: unifiedSearchResultsNoResultsLabel text: qsTr("No results for") - font.pixelSize: Style.subLinePixelSize * 1.25 + font.pixelSize: Style.unifiedSearchPlaceholderViewSublineFontPixelSize wrapMode: Text.Wrap Layout.fillWidth: true Layout.preferredHeight: Style.trayWindowHeaderHeight / 2 @@ -48,7 +48,7 @@ ColumnLayout { EnforcedPlainTextLabel { id: unifiedSearchResultsNoResultsLabelDetails text: unifiedSearchResultNothingFoundContainer.text - font.pixelSize: Style.topLinePixelSize * 1.25 + font.pixelSize: Style.unifiedSearchPlaceholderViewTitleFontPixelSize wrapMode: Text.Wrap maximumLineCount: 2 elide: Text.ElideRight diff --git a/theme/Style/Style.qml b/theme/Style/Style.qml index 6d63d2898a705..014fa5a07690f 100644 --- a/theme/Style/Style.qml +++ b/theme/Style/Style.qml @@ -141,6 +141,8 @@ QtObject { readonly property int unifiedSearchResultSectionItemVerticalPadding: 8 readonly property int unifiedSearchResultNothingFoundHorizontalMargin: 10 readonly property int unifiedSearchInputContainerHeight: 40 + readonly property int unifiedSearchPlaceholderViewTitleFontPixelSize: pixelSize * 1.25 + readonly property int unifiedSearchPlaceholderViewSublineFontPixelSize: subLinePixelSize * 1.25 readonly property int radioButtonCustomMarginLeftInner: 4 readonly property int radioButtonCustomMarginLeftOuter: 5