forked from Shinonome/dots-hyprland
search: change anchor declaration
This commit is contained in:
@@ -100,7 +100,6 @@ Scope {
|
|||||||
|
|
||||||
SearchWidget {
|
SearchWidget {
|
||||||
id: searchWidget
|
id: searchWidget
|
||||||
panelWindow: root
|
|
||||||
Layout.alignment: Qt.AlignHCenter
|
Layout.alignment: Qt.AlignHCenter
|
||||||
onSearchingTextChanged: (text) => {
|
onSearchingTextChanged: (text) => {
|
||||||
root.searchingText = searchingText
|
root.searchingText = searchingText
|
||||||
|
|||||||
@@ -65,8 +65,6 @@ RippleButton {
|
|||||||
property int buttonVerticalPadding: 5
|
property int buttonVerticalPadding: 5
|
||||||
property bool keyboardDown: false
|
property bool keyboardDown: false
|
||||||
|
|
||||||
anchors.left: parent?.left
|
|
||||||
anchors.right: parent?.right
|
|
||||||
implicitHeight: rowLayout.implicitHeight + root.buttonVerticalPadding * 2
|
implicitHeight: rowLayout.implicitHeight + root.buttonVerticalPadding * 2
|
||||||
implicitWidth: rowLayout.implicitWidth + root.buttonHorizontalPadding * 2
|
implicitWidth: rowLayout.implicitWidth + root.buttonHorizontalPadding * 2
|
||||||
buttonRadius: Appearance.rounding.normal
|
buttonRadius: Appearance.rounding.normal
|
||||||
|
|||||||
@@ -15,7 +15,6 @@ import Quickshell.Hyprland
|
|||||||
|
|
||||||
Item { // Wrapper
|
Item { // Wrapper
|
||||||
id: root
|
id: root
|
||||||
required property var panelWindow
|
|
||||||
readonly property string xdgConfigHome: XdgDirectories.config
|
readonly property string xdgConfigHome: XdgDirectories.config
|
||||||
property string searchingText: ""
|
property string searchingText: ""
|
||||||
property bool showResults: searchingText != ""
|
property bool showResults: searchingText != ""
|
||||||
@@ -195,7 +194,7 @@ Item { // Wrapper
|
|||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
spacing: 0
|
spacing: 0
|
||||||
|
|
||||||
clip: true
|
// clip: true
|
||||||
layer.enabled: true
|
layer.enabled: true
|
||||||
layer.effect: OpacityMask {
|
layer.effect: OpacityMask {
|
||||||
maskSource: Rectangle {
|
maskSource: Rectangle {
|
||||||
@@ -218,7 +217,7 @@ Item { // Wrapper
|
|||||||
TextField { // Search box
|
TextField { // Search box
|
||||||
id: searchInput
|
id: searchInput
|
||||||
|
|
||||||
focus: root.panelWindow.visible || GlobalStates.overviewOpen
|
focus: GlobalStates.overviewOpen
|
||||||
Layout.rightMargin: 15
|
Layout.rightMargin: 15
|
||||||
padding: 15
|
padding: 15
|
||||||
renderType: Text.NativeRendering
|
renderType: Text.NativeRendering
|
||||||
@@ -231,9 +230,6 @@ Item { // Wrapper
|
|||||||
|
|
||||||
Behavior on implicitWidth {
|
Behavior on implicitWidth {
|
||||||
id: searchWidthBehavior
|
id: searchWidthBehavior
|
||||||
onEnabledChanged: {
|
|
||||||
console.log("Search width behavior enabled:", enabled);
|
|
||||||
}
|
|
||||||
enabled: false
|
enabled: false
|
||||||
NumberAnimation {
|
NumberAnimation {
|
||||||
duration: 300
|
duration: 300
|
||||||
@@ -276,7 +272,7 @@ Item { // Wrapper
|
|||||||
visible: root.showResults
|
visible: root.showResults
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
implicitHeight: Math.min(600, appResults.contentHeight + topMargin + bottomMargin)
|
implicitHeight: Math.min(600, appResults.contentHeight + topMargin + bottomMargin)
|
||||||
clip: true
|
// clip: true
|
||||||
topMargin: 10
|
topMargin: 10
|
||||||
bottomMargin: 10
|
bottomMargin: 10
|
||||||
spacing: 0
|
spacing: 0
|
||||||
@@ -406,6 +402,8 @@ Item { // Wrapper
|
|||||||
|
|
||||||
delegate: SearchItem { // The selectable item for each search result
|
delegate: SearchItem { // The selectable item for each search result
|
||||||
required property var modelData
|
required property var modelData
|
||||||
|
anchors.left: parent?.left
|
||||||
|
anchors.right: parent?.right
|
||||||
entry: modelData
|
entry: modelData
|
||||||
query: root.searchingText.startsWith(ConfigOptions.search.prefix.clipboard) ?
|
query: root.searchingText.startsWith(ConfigOptions.search.prefix.clipboard) ?
|
||||||
root.searchingText.slice(ConfigOptions.search.prefix.clipboard.length) :
|
root.searchingText.slice(ConfigOptions.search.prefix.clipboard.length) :
|
||||||
|
|||||||
Reference in New Issue
Block a user