Renamed most font and sizing shorthands properties for easier understanding and maintenance
property real fontSizeXS: 9 property real fontSizeS: 10 property real fontSizeM: 11 property real fontSizeL: 13 property real fontSizeXL: 16 property real fontSizeXXL: 18 property real fontSizeXXXL: 24
This commit is contained in:
parent
ddd74c65e4
commit
b723eccc78
56 changed files with 1419 additions and 1423 deletions
|
|
@ -274,10 +274,10 @@ NLoader {
|
|||
anchors.centerIn: parent
|
||||
width: Math.min(700 * scaling, parent.width * 0.75)
|
||||
height: Math.min(550 * scaling, parent.height * 0.8)
|
||||
radius: Style.radiusLarge * scaling
|
||||
radius: Style.radiusL * scaling
|
||||
color: Color.mSurface
|
||||
border.color: Color.mOutline
|
||||
border.width: Style.borderThin * scaling
|
||||
border.width: Style.borderS * scaling
|
||||
|
||||
// Subtle gradient background
|
||||
gradient: Gradient {
|
||||
|
|
@ -293,28 +293,27 @@ NLoader {
|
|||
|
||||
ColumnLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginLarge * scaling
|
||||
spacing: Style.marginMedium * scaling
|
||||
anchors.margins: Style.marginL * scaling
|
||||
spacing: Style.marginM * scaling
|
||||
|
||||
// Search bar
|
||||
Rectangle {
|
||||
Layout.fillWidth: true
|
||||
Layout.preferredHeight: Style.barHeight * scaling
|
||||
Layout.bottomMargin: Style.marginMedium * scaling
|
||||
radius: Style.radiusMedium * scaling
|
||||
Layout.bottomMargin: Style.marginM * scaling
|
||||
radius: Style.radiusM * scaling
|
||||
color: Color.mSurface
|
||||
border.color: searchInput.activeFocus ? Color.mPrimary : Color.mOutline
|
||||
border.width: Math.max(1,
|
||||
searchInput.activeFocus ? Style.borderMedium * scaling : Style.borderThin * scaling)
|
||||
border.width: Math.max(1, searchInput.activeFocus ? Style.borderM * scaling : Style.borderS * scaling)
|
||||
|
||||
Item {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginMedium * scaling
|
||||
anchors.margins: Style.marginM * scaling
|
||||
|
||||
NIcon {
|
||||
id: searchIcon
|
||||
text: "search"
|
||||
font.pointSize: Style.fontSizeLarger * scaling
|
||||
font.pointSize: Style.fontSizeXL * scaling
|
||||
color: searchInput.activeFocus ? Color.mPrimary : Color.mOnSurface
|
||||
anchors.left: parent.left
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
|
|
@ -326,9 +325,9 @@ NLoader {
|
|||
color: Color.mOnSurface
|
||||
placeholderTextColor: Color.mOnSurfaceVariant
|
||||
background: null
|
||||
font.pointSize: Style.fontSizeLarge * scaling
|
||||
font.pointSize: Style.fontSizeL * scaling
|
||||
anchors.left: searchIcon.right
|
||||
anchors.leftMargin: Style.marginSmall * scaling
|
||||
anchors.leftMargin: Style.marginS * scaling
|
||||
anchors.right: parent.right
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
onTextChanged: {
|
||||
|
|
@ -386,18 +385,18 @@ NLoader {
|
|||
ListView {
|
||||
id: appsList
|
||||
anchors.fill: parent
|
||||
spacing: Style.marginTiniest * scaling
|
||||
spacing: Style.marginXXS * scaling
|
||||
model: filteredEntries
|
||||
currentIndex: selectedIndex
|
||||
|
||||
delegate: Rectangle {
|
||||
width: appsList.width - Style.marginSmall * scaling
|
||||
width: appsList.width - Style.marginS * scaling
|
||||
height: 65 * scaling
|
||||
radius: Style.radiusMedium * scaling
|
||||
radius: Style.radiusM * scaling
|
||||
property bool isSelected: index === selectedIndex
|
||||
color: (appCardArea.containsMouse || isSelected) ? Qt.darker(Color.mPrimary, 1.1) : Color.mSurface
|
||||
border.color: (appCardArea.containsMouse || isSelected) ? Color.mPrimary : Color.transparent
|
||||
border.width: Math.max(1, (appCardArea.containsMouse || isSelected) ? Style.borderMedium * scaling : 0)
|
||||
border.width: Math.max(1, (appCardArea.containsMouse || isSelected) ? Style.borderM * scaling : 0)
|
||||
|
||||
Behavior on color {
|
||||
ColorAnimation {
|
||||
|
|
@ -419,14 +418,14 @@ NLoader {
|
|||
|
||||
RowLayout {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginMedium * scaling
|
||||
spacing: Style.marginMedium * scaling
|
||||
anchors.margins: Style.marginM * scaling
|
||||
spacing: Style.marginM * scaling
|
||||
|
||||
// App icon with background
|
||||
Rectangle {
|
||||
Layout.preferredWidth: Style.baseWidgetSize * 1.25 * scaling
|
||||
Layout.preferredHeight: Style.baseWidgetSize * 1.25 * scaling
|
||||
radius: Style.radiusSmall * scaling
|
||||
radius: Style.radiusS * scaling
|
||||
color: appCardArea.containsMouse ? Qt.darker(Color.mPrimary, 1.1) : Color.mSurfaceVariant
|
||||
property bool iconLoaded: (modelData.isCalculator || modelData.isClipboard || modelData.isCommand)
|
||||
|| (iconImg.status === Image.Ready && iconImg.source !== ""
|
||||
|
|
@ -437,7 +436,7 @@ NLoader {
|
|||
Image {
|
||||
id: clipboardImage
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginTiny * scaling
|
||||
anchors.margins: Style.marginXS * scaling
|
||||
visible: modelData.type === 'image'
|
||||
source: modelData.data || ""
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
|
|
@ -448,7 +447,7 @@ NLoader {
|
|||
IconImage {
|
||||
id: iconImg
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginTiny * scaling
|
||||
anchors.margins: Style.marginXS * scaling
|
||||
asynchronous: true
|
||||
source: modelData.isCalculator ? "calculate" : modelData.isClipboard ? (modelData.type === 'image' ? "" : "content_paste") : modelData.isCommand ? modelData.icon : (modelData.icon ? Quickshell.iconPath(modelData.icon, "application-x-executable") : "")
|
||||
visible: (modelData.isCalculator || modelData.isClipboard || modelData.isCommand
|
||||
|
|
@ -458,8 +457,8 @@ NLoader {
|
|||
// Fallback icon container
|
||||
Rectangle {
|
||||
anchors.fill: parent
|
||||
anchors.margins: Style.marginTiny * scaling
|
||||
radius: Style.radiusTiny * scaling
|
||||
anchors.margins: Style.marginXS * scaling
|
||||
radius: Style.radiusXS * scaling
|
||||
color: Color.mPrimary
|
||||
opacity: Style.opacityMedium
|
||||
visible: !parent.iconLoaded
|
||||
|
|
@ -470,7 +469,7 @@ NLoader {
|
|||
visible: !parent.iconLoaded && !(modelData.isCalculator || modelData.isClipboard
|
||||
|| modelData.isCommand)
|
||||
text: modelData.name ? modelData.name.charAt(0).toUpperCase() : "?"
|
||||
font.pointSize: Style.fontSizeXL * scaling
|
||||
font.pointSize: Style.fontSizeXXL * scaling
|
||||
font.weight: Font.Bold
|
||||
color: Color.mPrimary
|
||||
}
|
||||
|
|
@ -485,11 +484,11 @@ NLoader {
|
|||
// App info
|
||||
ColumnLayout {
|
||||
Layout.fillWidth: true
|
||||
spacing: Style.marginTiniest * scaling
|
||||
spacing: Style.marginXXS * scaling
|
||||
|
||||
NText {
|
||||
text: modelData.name || "Unknown"
|
||||
font.pointSize: Style.fontSizeLarge * scaling
|
||||
font.pointSize: Style.fontSizeL * scaling
|
||||
font.weight: Font.Bold
|
||||
color: (appCardArea.containsMouse || isSelected) ? Color.mOnPrimary : Color.mOnSurface
|
||||
elide: Text.ElideRight
|
||||
|
|
@ -498,7 +497,7 @@ NLoader {
|
|||
|
||||
NText {
|
||||
text: modelData.isCalculator ? (modelData.expr + " = " + modelData.result) : modelData.isClipboard ? modelData.content : modelData.isCommand ? modelData.content : (modelData.genericName || modelData.comment || "")
|
||||
font.pointSize: Style.fontSizeMedium * scaling
|
||||
font.pointSize: Style.fontSizeM * scaling
|
||||
color: (appCardArea.containsMouse || isSelected) ? Color.mOnPrimary : Color.mOnSurface
|
||||
elide: Text.ElideRight
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -525,7 +524,7 @@ NLoader {
|
|||
// No results message
|
||||
NText {
|
||||
text: searchText.trim() !== "" ? "No applications found" : "No applications available"
|
||||
font.pointSize: Style.fontSizeLarge * scaling
|
||||
font.pointSize: Style.fontSizeL * scaling
|
||||
color: Color.mOnSurface
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
|
|
@ -540,7 +539,7 @@ NLoader {
|
|||
">calc") ? `${filteredEntries.length} result${filteredEntries.length
|
||||
!== 1 ? 's' : ''}` : `${filteredEntries.length} application${filteredEntries.length
|
||||
!== 1 ? 's' : ''}`
|
||||
font.pointSize: Style.fontSizeSmall * scaling
|
||||
font.pointSize: Style.fontSizeXS * scaling
|
||||
color: Color.mOnSurface
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
Layout.fillWidth: true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue