forked from Shinonome/dots-hyprland
waffles: start: more search progress
This commit is contained in:
@@ -64,7 +64,7 @@ Singleton {
|
||||
property color bg0: "#1C1C1C"
|
||||
property color bg0Border: "#404040"
|
||||
property color bg1Base: "#2C2C2C"
|
||||
property color bg1: "#a8a8a8"
|
||||
property color bg1: '#9f9f9f'
|
||||
property color bg1Hover: "#b3b3b3"
|
||||
property color bg1Active: '#727272'
|
||||
property color bg1Border: '#bebebe'
|
||||
@@ -125,6 +125,7 @@ Singleton {
|
||||
property color accentUnfocused: root.dark ? root.darkColors.accentUnfocused : root.lightColors.accentUnfocused
|
||||
property color accentFg: ColorUtils.isDark(accent) ? "#FFFFFF" : "#000000"
|
||||
property color selection: Appearance.colors.colPrimaryContainer
|
||||
property color selectionFg: Appearance.colors.colOnPrimaryContainer
|
||||
}
|
||||
|
||||
radius: QtObject {
|
||||
|
||||
@@ -44,6 +44,7 @@ WButton {
|
||||
radius: Looks.radius.medium
|
||||
color: root.color
|
||||
Behavior on color {
|
||||
enabled: root.animateChoiceHighlight
|
||||
animation: Looks.transition.color.createObject(this)
|
||||
}
|
||||
|
||||
|
||||
@@ -14,17 +14,18 @@ Menu {
|
||||
property bool downDirection: false
|
||||
property bool hasIcons: false // TODO: implement
|
||||
|
||||
implicitWidth: background.implicitWidth + root.padding * 2
|
||||
implicitHeight: background.implicitHeight + root.padding * 2
|
||||
implicitWidth: background.implicitWidth + margins * 2
|
||||
implicitHeight: background.implicitHeight + margins * 2
|
||||
margins: 10
|
||||
padding: 3
|
||||
property real sourceEdgeMargin: -implicitHeight
|
||||
clip: true
|
||||
|
||||
|
||||
enter: Transition {
|
||||
NumberAnimation {
|
||||
property: "sourceEdgeMargin"
|
||||
from: -root.implicitHeight
|
||||
to: root.padding
|
||||
to: root.margins
|
||||
duration: 200
|
||||
easing.type: Easing.BezierSpline
|
||||
easing.bezierCurve: Looks.transition.easing.bezierCurve.easeIn
|
||||
@@ -33,7 +34,7 @@ Menu {
|
||||
exit: Transition {
|
||||
NumberAnimation {
|
||||
property: "sourceEdgeMargin"
|
||||
from: root.padding
|
||||
from: root.margins
|
||||
to: -root.implicitHeight
|
||||
duration: 150
|
||||
easing.type: Easing.BezierSpline
|
||||
@@ -41,43 +42,55 @@ Menu {
|
||||
}
|
||||
}
|
||||
|
||||
background: WPane {
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: root.downDirection ? parent.top : undefined
|
||||
bottom: root.downDirection ? undefined : parent.bottom
|
||||
margins: root.padding
|
||||
topMargin: root.downDirection ? root.sourceEdgeMargin : root.padding
|
||||
bottomMargin: root.downDirection ? root.padding : root.sourceEdgeMargin
|
||||
}
|
||||
contentItem: Rectangle {
|
||||
color: Looks.colors.bg1Base
|
||||
implicitWidth: menuListView.implicitWidth + root.padding * 2
|
||||
implicitHeight: root.contentItem.implicitHeight + root.padding * 2
|
||||
background: Item {
|
||||
id: bgItem
|
||||
implicitWidth: bgPane.implicitWidth
|
||||
implicitHeight: bgPane.implicitHeight
|
||||
WPane {
|
||||
id: bgPane
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: root.downDirection ? parent.top : undefined
|
||||
bottom: root.downDirection ? undefined : parent.bottom
|
||||
margins: root.margins
|
||||
topMargin: root.downDirection ? root.sourceEdgeMargin : root.margins
|
||||
bottomMargin: root.downDirection ? root.margins : root.sourceEdgeMargin
|
||||
}
|
||||
contentItem: Rectangle {
|
||||
color: Looks.colors.bg1Base
|
||||
implicitWidth: menuListView.implicitWidth + root.padding * 2
|
||||
implicitHeight: root.contentItem.implicitHeight + root.padding * 2
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
contentItem: ListView {
|
||||
id: menuListView
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: root.downDirection ? parent.top : undefined
|
||||
bottom: root.downDirection ? undefined : parent.bottom
|
||||
margins: root.padding * 2
|
||||
topMargin: root.downDirection ? root.sourceEdgeMargin : root.padding
|
||||
bottomMargin: root.downDirection ? root.padding : root.sourceEdgeMargin
|
||||
}
|
||||
implicitHeight: contentHeight
|
||||
implicitWidth: Array.from({
|
||||
length: count
|
||||
}, (_, i) => itemAtIndex(i)?.implicitWidth ?? 0).reduce((a, b) => a > b ? a : b)
|
||||
contentItem: Item {
|
||||
implicitWidth: menuListView.implicitWidth
|
||||
implicitHeight: menuListView.implicitHeight
|
||||
ListView {
|
||||
id: menuListView
|
||||
anchors {
|
||||
left: parent.left
|
||||
right: parent.right
|
||||
top: root.downDirection ? parent.top : undefined
|
||||
bottom: root.downDirection ? undefined : parent.bottom
|
||||
margins: root.margins // ????
|
||||
topMargin: root.downDirection ? root.sourceEdgeMargin : root.margins
|
||||
bottomMargin: root.downDirection ? root.margins : root.sourceEdgeMargin
|
||||
}
|
||||
implicitHeight: contentHeight
|
||||
implicitWidth: Array.from({
|
||||
length: count
|
||||
}, (_, i) => itemAtIndex(i)?.implicitWidth ?? 0).reduce((a, b) => a > b ? a : b)
|
||||
|
||||
model: root.contentModel
|
||||
model: root.contentModel
|
||||
}
|
||||
}
|
||||
|
||||
delegate: WMenuItem {
|
||||
id: menuItemDelegate
|
||||
width: ListView.view?.width
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,14 +10,17 @@ WButton {
|
||||
id: root
|
||||
|
||||
property alias iconName: iconContent.icon
|
||||
property alias iconSize: iconContent.implicitSize
|
||||
property alias monochrome: iconContent.monochrome
|
||||
implicitWidth: 40
|
||||
implicitHeight: 40
|
||||
|
||||
contentItem: FluentIcon {
|
||||
id: iconContent
|
||||
anchors.centerIn: parent
|
||||
implicitSize: 18
|
||||
icon: root.iconName
|
||||
contentItem: Item {
|
||||
FluentIcon {
|
||||
id: iconContent
|
||||
anchors.centerIn: parent
|
||||
implicitSize: 18
|
||||
icon: root.iconName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,4 +15,5 @@ TextInput {
|
||||
}
|
||||
|
||||
selectionColor: Looks.colors.selection
|
||||
selectedTextColor: Looks.colors.selectionFg
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user