Revert Applauncher reload button

This commit is contained in:
Ly-sec 2025-07-25 16:46:33 +02:00
parent df9f886aa6
commit 3e4c9095d7

View file

@ -173,116 +173,69 @@ PanelWithOverlay {
anchors.margins: 32 anchors.margins: 32
spacing: 18 spacing: 18
// Search Bar Row // Search Bar
RowLayout { Rectangle {
spacing: 12 id: searchBar
color: Theme.surfaceVariant
radius: 22
height: 48
Layout.fillWidth: true Layout.fillWidth: true
border.color: searchField.activeFocus ? Theme.accentPrimary : Theme.outline
border.width: searchField.activeFocus ? 2 : 1
// Search Bar RowLayout {
Rectangle { anchors.left: parent.left
id: searchBar anchors.right: parent.right
color: Theme.surfaceVariant anchors.verticalCenter: parent.verticalCenter
radius: 22 anchors.leftMargin: 14
height: 48 anchors.rightMargin: 14
Layout.fillWidth: true spacing: 10
Layout.preferredWidth: 320 // Made the search bar narrower
border.color: searchField.activeFocus ? Theme.accentPrimary : Theme.outline
border.width: searchField.activeFocus ? 2 : 1
RowLayout {
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.leftMargin: 14
anchors.rightMargin: 14
spacing: 10
Text {
text: "search"
font.family: "Material Symbols Outlined"
font.pixelSize: Theme.fontSizeHeader
color: searchField.activeFocus ? Theme.accentPrimary : Theme.textSecondary
verticalAlignment: Text.AlignVCenter
Layout.alignment: Qt.AlignVCenter
}
TextField {
id: searchField
placeholderText: "Search apps..."
color: Theme.textPrimary
placeholderTextColor: Theme.textSecondary
background: null
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeBody
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
onTextChanged: root.updateFilter()
selectedTextColor: Theme.onAccent
selectionColor: Theme.accentPrimary
padding: 0
verticalAlignment: TextInput.AlignVCenter
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
font.bold: true
Component.onCompleted: contentItem.cursorColor = Theme.textPrimary
onActiveFocusChanged: contentItem.cursorColor = Theme.textPrimary
Keys.onDownPressed: root.selectNext()
Keys.onUpPressed: root.selectPrev()
Keys.onEnterPressed: root.activateSelected()
Keys.onReturnPressed: root.activateSelected()
Keys.onEscapePressed: appLauncherPanel.hidePanel()
}
}
Behavior on border.color {
ColorAnimation {
duration: 120
}
}
Behavior on border.width {
NumberAnimation {
duration: 120
}
}
}
// Added rectangle with onClick
Rectangle {
id: actionButton
width: 48
height: 48
radius: 20
color: mouseArea.containsPress ? Theme.accentPrimary : Theme.surfaceVariant
border.color: mouseArea.containsMouse ? Theme.accentPrimary : Theme.outline
border.width: 2
Text { Text {
text: "refresh" text: "search"
font.family: "Material Symbols Outlined" font.family: "Material Symbols Outlined"
font.pixelSize: Theme.fontSizeHeader font.pixelSize: Theme.fontSizeHeader
color: mouseArea.containsMouse ? Theme.accentPrimary : Theme.textPrimary color: searchField.activeFocus ? Theme.accentPrimary : Theme.textSecondary
anchors.centerIn: parent verticalAlignment: Text.AlignVCenter
Layout.alignment: Qt.AlignVCenter
} }
TextField {
id: searchField
placeholderText: "Search apps..."
color: Theme.textPrimary
placeholderTextColor: Theme.textSecondary
background: null
font.family: Theme.fontFamily
font.pixelSize: Theme.fontSizeBody
Layout.fillWidth: true
Layout.alignment: Qt.AlignVCenter
onTextChanged: root.updateFilter()
selectedTextColor: Theme.onAccent
selectionColor: Theme.accentPrimary
padding: 0
verticalAlignment: TextInput.AlignVCenter
leftPadding: 0
rightPadding: 0
topPadding: 0
bottomPadding: 0
font.bold: true
Component.onCompleted: contentItem.cursorColor = Theme.textPrimary
onActiveFocusChanged: contentItem.cursorColor = Theme.textPrimary
MouseArea { Keys.onDownPressed: root.selectNext()
id: mouseArea Keys.onUpPressed: root.selectPrev()
anchors.fill: parent Keys.onEnterPressed: root.activateSelected()
hoverEnabled: true Keys.onReturnPressed: root.activateSelected()
onClicked: { Keys.onEscapePressed: appLauncherPanel.hidePanel()
Quickshell.reload(true);
}
cursorShape: Qt.PointingHandCursor
} }
}
Behavior on color { Behavior on border.color {
ColorAnimation { ColorAnimation {
duration: 120 duration: 120
}
} }
Behavior on border.color { }
ColorAnimation { Behavior on border.width {
duration: 120 NumberAnimation {
} duration: 120
} }
} }
} }