forked from Shinonome/dots-hyprland
wbar: add widgets, taskview, light theme
This commit is contained in:
@@ -9,6 +9,7 @@ BarButton {
|
||||
id: root
|
||||
|
||||
required property string iconName
|
||||
property bool separateLightDark: false
|
||||
implicitWidth: height - topInset - bottomInset + leftInset + rightInset
|
||||
|
||||
contentItem: Item {
|
||||
@@ -27,14 +28,10 @@ BarButton {
|
||||
}
|
||||
}
|
||||
|
||||
Kirigami.Icon {
|
||||
AppIcon {
|
||||
id: iconWidget
|
||||
anchors.centerIn: parent
|
||||
implicitWidth: 26
|
||||
implicitHeight: 26
|
||||
roundToIconSize: false
|
||||
source: `${Looks.iconsPath}/${root.iconName}-${Looks.dark ? "dark" : "light"}.svg`
|
||||
fallback: root.iconName
|
||||
iconName: root.iconName
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
import QtQuick
|
||||
import org.kde.kirigami as Kirigami
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.waffle.looks
|
||||
|
||||
Kirigami.Icon {
|
||||
id: iconWidget
|
||||
required property string iconName
|
||||
|
||||
implicitWidth: 26
|
||||
implicitHeight: 26
|
||||
roundToIconSize: false
|
||||
source: `${Looks.iconsPath}/${root.iconName}${!root.separateLightDark ? "" : Looks.dark ? "-dark" : "-light"}.svg`
|
||||
fallback: root.iconName
|
||||
}
|
||||
@@ -9,4 +9,5 @@ AppButton {
|
||||
id: root
|
||||
|
||||
iconName: "system-search"
|
||||
separateLightDark: true
|
||||
}
|
||||
|
||||
@@ -8,6 +8,6 @@ import qs.modules.waffle.looks
|
||||
AppButton {
|
||||
id: root
|
||||
|
||||
leftInset: 12
|
||||
leftInset: Config.options.waffles.bar.leftAlignApps ? 12 : 0
|
||||
iconName: "start-here"
|
||||
}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import org.kde.kirigami as Kirigami
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.waffle.looks
|
||||
|
||||
AppButton {
|
||||
id: root
|
||||
|
||||
iconName: "task-view"
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import qs.modules.common
|
||||
import qs.modules.common.widgets
|
||||
import qs.modules.waffle.looks
|
||||
|
||||
Rectangle {
|
||||
@@ -21,6 +22,18 @@ Rectangle {
|
||||
implicitHeight: 1
|
||||
}
|
||||
|
||||
BarGroupRow {
|
||||
id: bloatRow
|
||||
anchors.left: parent.left
|
||||
opacity: Config.options.waffles.bar.leftAlignApps ? 0 : 1
|
||||
visible: opacity > 0
|
||||
Behavior on opacity {
|
||||
animation: Looks.transition.opacity.createObject(this)
|
||||
}
|
||||
|
||||
WidgetsButton {}
|
||||
}
|
||||
|
||||
BarGroupRow {
|
||||
id: appsRow
|
||||
spacing: 4
|
||||
@@ -43,11 +56,17 @@ Rectangle {
|
||||
|
||||
StartButton {}
|
||||
SearchButton {}
|
||||
TaskViewButton {}
|
||||
}
|
||||
|
||||
BarGroupRow {
|
||||
id: systemRow
|
||||
anchors.right: parent.right
|
||||
FadeLoader {
|
||||
Layout.fillHeight: true
|
||||
shown: Config.options.waffles.bar.leftAlignApps
|
||||
sourceComponent: WidgetsButton {}
|
||||
}
|
||||
SystemButton {}
|
||||
TimeButton {}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
import QtQuick
|
||||
import QtQuick.Layouts
|
||||
import org.kde.kirigami as Kirigami
|
||||
import qs.services
|
||||
import qs.modules.common
|
||||
import qs.modules.waffle.looks
|
||||
|
||||
AppButton {
|
||||
id: root
|
||||
|
||||
readonly property bool expandedForm: Config.options.waffles.bar.leftAlignApps
|
||||
leftInset: Config.options.waffles.bar.leftAlignApps ? 0 : 12
|
||||
implicitWidth: expandedForm ? 148 : (height - topInset - bottomInset + leftInset + rightInset)
|
||||
iconName: "widgets"
|
||||
|
||||
contentItem: Item {
|
||||
anchors {
|
||||
verticalCenter: parent.verticalCenter
|
||||
left: root.expandedForm ? parent.left : undefined
|
||||
horizontalCenter: root.expandedForm ? undefined : background.horizontalCenter
|
||||
}
|
||||
implicitHeight: row.implicitHeight
|
||||
implicitWidth: row.implicitWidth
|
||||
Row {
|
||||
id: row
|
||||
anchors {
|
||||
verticalCenter: parent.verticalCenter
|
||||
left: root.expandedForm ? parent.left : undefined
|
||||
horizontalCenter: root.expandedForm ? undefined : parent.horizontalCenter
|
||||
margins: 8
|
||||
}
|
||||
|
||||
AppIcon {
|
||||
id: iconWidget
|
||||
iconName: root.iconName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user