Improve hover behaviour, make font configurable, adjust overview
This commit is contained in:
@@ -42,6 +42,7 @@ Column {
|
||||
Text {
|
||||
parent: profile
|
||||
anchors.centerIn: parent
|
||||
font.family: root.font
|
||||
text: PowerProfile.toString(powerProfile)
|
||||
color: PowerProfiles.profile === powerProfile ? "black" : "white"
|
||||
Behavior on color { ColorAnimation {duration: 50}}
|
||||
@@ -96,6 +97,7 @@ Column {
|
||||
Text {
|
||||
anchors.centerIn: parent
|
||||
font.pixelSize: 20
|
||||
font.family: root.font
|
||||
color: "white"
|
||||
text: Math.round(modelData.percentage * 100) + "%"
|
||||
}
|
||||
@@ -107,6 +109,7 @@ Column {
|
||||
x: 4
|
||||
text: UPowerDeviceType.toString(modelData.type)
|
||||
font.pixelSize: 20
|
||||
font.family: root.font
|
||||
color: "white"
|
||||
}
|
||||
Row {
|
||||
@@ -126,6 +129,7 @@ Column {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: "white"
|
||||
font.pixelSize: 16
|
||||
font.family: root.font
|
||||
text: card.data
|
||||
}
|
||||
Text {
|
||||
@@ -133,6 +137,7 @@ Column {
|
||||
color: "#aaa"
|
||||
text: card.label
|
||||
font.pixelSize: 12
|
||||
font.family: root.font
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,6 +41,7 @@ Column {
|
||||
leftMargin: 6
|
||||
}
|
||||
font.pixelSize: 16
|
||||
font.family: root.font
|
||||
color: "white"
|
||||
text: "Display brightness"
|
||||
}
|
||||
@@ -75,6 +76,7 @@ Column {
|
||||
}
|
||||
height: 24
|
||||
font.pixelSize: 14
|
||||
font.family: root.font
|
||||
color: "white"
|
||||
text: toggleButton.text
|
||||
}
|
||||
|
||||
@@ -47,6 +47,7 @@ Item {
|
||||
Behavior on x {NumberAnimation {duration: 300; easing.type: Easing.OutQuint}}
|
||||
focus: true
|
||||
font.pixelSize: 20
|
||||
font.family: root.font
|
||||
color: "white"
|
||||
cursorDelegate: Item {}
|
||||
onCursorPositionChanged: cursorPosition = text.length
|
||||
@@ -156,6 +157,7 @@ Item {
|
||||
Text {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
font.pixelSize: 64
|
||||
font.family: root.font
|
||||
text: modelData.emoji ?? ""
|
||||
color: "white"
|
||||
}
|
||||
@@ -168,6 +170,7 @@ Item {
|
||||
text: modelData.name
|
||||
color: "white"
|
||||
font.pixelSize: 16
|
||||
font.family: root.font
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
elide: Text.ElideRight
|
||||
}
|
||||
|
||||
@@ -39,6 +39,7 @@ Item {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: "#888"
|
||||
text: "No notifications"
|
||||
font.family: root.font
|
||||
}
|
||||
}
|
||||
ListView {
|
||||
@@ -94,6 +95,7 @@ Item {
|
||||
anchors.horizontalCenter: parent.horizontalCenter
|
||||
color: "#888"
|
||||
text: "Nothing playing"
|
||||
font.family: root.font
|
||||
}
|
||||
}
|
||||
Column {
|
||||
@@ -177,6 +179,7 @@ Item {
|
||||
color: "white"
|
||||
text: player.modelData?.trackTitle ?? ""
|
||||
font.pixelSize: 16
|
||||
font.family: root.font
|
||||
}
|
||||
Text {
|
||||
anchors {
|
||||
@@ -188,6 +191,7 @@ Item {
|
||||
color: "white"
|
||||
text: player.modelData?.trackArtist ?? ""
|
||||
font.pixelSize: 12
|
||||
font.family: root.font
|
||||
}
|
||||
Item {width: 1; height: 8}
|
||||
Row {
|
||||
|
||||
+45
-8
@@ -1,4 +1,5 @@
|
||||
import QtQuick
|
||||
import QtQuick.Effects
|
||||
import Quickshell
|
||||
import Quickshell.Hyprland
|
||||
import Quickshell.Widgets
|
||||
@@ -16,7 +17,7 @@ Grid {
|
||||
horizontalItemAlignment: Grid.AlignHCenter
|
||||
verticalItemAlignment: Grid.AlignVCenter
|
||||
onVisibleChanged: {
|
||||
if (!visible) return
|
||||
if (!visible) return;
|
||||
Hyprland.refreshToplevels()
|
||||
}
|
||||
component WorkspaceView: ClippingRectangle {
|
||||
@@ -52,20 +53,56 @@ Grid {
|
||||
}
|
||||
Repeater {
|
||||
model: Hyprland.toplevels.values.filter(tl => tl.workspace?.id == modelData + 1)
|
||||
delegate: ClippingRectangle {
|
||||
x: modelData.lastIpcObject.at[0] * workspaceView.widthRatio - 2
|
||||
y: modelData.lastIpcObject.at[1] * workspaceView.widthRatio - 2
|
||||
width: modelData.lastIpcObject.size[0] * workspaceView.widthRatio
|
||||
height: modelData.lastIpcObject.size[1] * workspaceView.widthRatio
|
||||
delegate: Item {
|
||||
x: modelData.lastIpcObject.at?.[0] * workspaceView.widthRatio - 2
|
||||
y: modelData.lastIpcObject.at?.[1] * workspaceView.widthRatio - 2
|
||||
width: modelData.lastIpcObject.size?.[0] * workspaceView.widthRatio
|
||||
height: modelData.lastIpcObject.size?.[1] * workspaceView.widthRatio
|
||||
ScreencopyView {
|
||||
anchors.fill: parent
|
||||
captureSource: modelData.wayland
|
||||
live: overview.visible
|
||||
layer.enabled: true
|
||||
layer.effect: MultiEffect {
|
||||
blurEnabled: true
|
||||
blurMax: 8
|
||||
blur: 1
|
||||
autoPaddingEnabled: false
|
||||
}
|
||||
}
|
||||
Image {
|
||||
id: appicon
|
||||
anchors.centerIn: parent
|
||||
width: 36
|
||||
height: width
|
||||
sourceSize.width: width
|
||||
sourceSize.height: height
|
||||
source: {
|
||||
const appId = modelData.wayland?.appId
|
||||
const iconName = DesktopEntries.applications.values.find(
|
||||
app => app.startupClass === appId || app.id === appId
|
||||
)?.icon;
|
||||
return Quickshell.iconPath(iconName)
|
||||
}
|
||||
layer.enabled: true
|
||||
visible: false
|
||||
}
|
||||
MultiEffect {
|
||||
anchors.fill: appicon
|
||||
source: appicon
|
||||
blurMax: 12
|
||||
shadowEnabled: true
|
||||
}
|
||||
MultiEffect {
|
||||
anchors.fill: appicon
|
||||
source: appicon
|
||||
blurMax: 12
|
||||
shadowEnabled: true
|
||||
}
|
||||
}
|
||||
}
|
||||
TapHandler { onTapped: {
|
||||
if (modelData < 0) return
|
||||
if (modelData < 0) return;
|
||||
Hyprland.dispatch(`hl.dsp.focus({workspace = ${modelData + 1}})`)
|
||||
root.close()
|
||||
}}
|
||||
@@ -80,7 +117,7 @@ Grid {
|
||||
bottomRightRadius: 12
|
||||
TapHandler {
|
||||
onTapped: {
|
||||
Hyprland.dispatch(`hl.dsp.workspace.toggle_special()`)
|
||||
Hyprland.dispatch('hl.dsp.workspace.toggle_special()')
|
||||
root.close()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,6 +86,7 @@ Row {
|
||||
}
|
||||
color: "white"
|
||||
font.pixelSize: 16
|
||||
font.family: root.font
|
||||
}
|
||||
Widgets.Slider {
|
||||
value: modelData.audio.volume
|
||||
|
||||
Reference in New Issue
Block a user