intermediary changes, plan to revert to mousearea for gestures + config load bugfixes
C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 9s
C++ / clang-tidy (pull_request) Failing after 9s
JS/TS / fmt (pull_request) Successful in 13s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Successful in 41s
Rust / build (pull_request) Successful in 51s
Python / verify (pull_request) Successful in 1m45s
Rust / fmt (pull_request) Successful in 33s
Rust / clippy (pull_request) Successful in 52s

This commit is contained in:
2026-09-22 02:35:18 +02:00
parent 25bee293b0
commit a1d96b60f6
15 changed files with 461 additions and 155 deletions
+27 -23
View File
@@ -87,15 +87,27 @@ Item {
if (root.singleGestureTriggered) if (root.singleGestureTriggered)
return; return;
// if (root.geometry.insetTop(root.borderThickness) > pressY) { const inDashboard = root.inTopPanel(root.panels.dashboardWrapper, pressX, pressY);
// if (dragY > 20) {
// root.screenState.settings = true; if (inDashboard && root.withinPanelWidth(root.panels.dashboardWrapper, x, y)) {
// root.singleGestureTriggered = true; if (dragY > Config.dashboard.dragThreshold) {
// } else if (dragY < -20) { root.screenState.dashboard = true;
// root.screenState.settings = false; root.singleGestureTriggered = true;
// root.singleGestureTriggered = true; } else if (dragY < -Config.dashboard.dragThreshold) {
// } root.screenState.dashboard = false;
// } root.singleGestureTriggered = true;
}
}
if (root.geometry.insetTop(root.borderThickness) > pressY && (Config.dashboard.showOnHover || !inDashboard)) {
if (dragY > 20) {
root.screenState.settings = true;
root.singleGestureTriggered = true;
} else if (dragY < -20) {
root.screenState.settings = false;
root.singleGestureTriggered = true;
}
}
if (pressY > root.screen.height - root.geometry.insetBottom(root.borderThickness) && pressX < root.screen.width / 5 && dragY < -50) if (pressY > root.screen.height - root.geometry.insetBottom(root.borderThickness) && pressX < root.screen.width / 5 && dragY < -50)
root.screenState.clipboard = true; root.screenState.clipboard = true;
@@ -120,16 +132,6 @@ Item {
Hypr.dispatch(`hl.dsp.focus({ workspace = 'r-1', on_current_monitor = true })`); Hypr.dispatch(`hl.dsp.focus({ workspace = 'r-1', on_current_monitor = true })`);
root.singleGestureTriggered = true; root.singleGestureTriggered = true;
} }
if (root.inTopPanel(root.panels.dashboardWrapper, pressX, pressY) && root.withinPanelWidth(root.panels.dashboardWrapper, x, y)) {
if (dragY > Config.dashboard.dragThreshold) {
root.screenState.dashboard = true;
root.singleGestureTriggered = true;
} else if (dragY < -Config.dashboard.dragThreshold) {
root.screenState.dashboard = false;
root.singleGestureTriggered = true;
}
}
} }
} }
@@ -276,6 +278,7 @@ Item {
root.screenState.settings = false; root.screenState.settings = false;
root.screenState.sidebar = false; root.screenState.sidebar = false;
root.screenState.resources = false;
root.popouts.hasCurrent = false; root.popouts.hasCurrent = false;
} else { } else {
root.dashboardShortcutActive = false; root.dashboardShortcutActive = false;
@@ -323,12 +326,13 @@ Item {
} }
function onResourcesChanged() { function onResourcesChanged() {
if (root.screenState.resources && (root.popouts.currentName.startsWith("audio") || root.popouts.currentName.startsWith("updates"))) { if (root.screenState.resources) {
root.popouts.hasCurrent = false; if (root.popouts.currentName.startsWith("audio") || root.popouts.currentName.startsWith("updates"))
} root.popouts.hasCurrent = false;
if (root.screenState.resources)
root.screenState.settings = false; root.screenState.settings = false;
root.screenState.dashboard = false;
}
} }
function onSettingsChanged() { function onSettingsChanged() {
+312
View File
@@ -0,0 +1,312 @@
import QtQuick
import QtQuick.Controls
import Quickshell
import ZShell.Config
import qs.Components
import qs.Modules.Bar as Bar
import qs.Modules.Bar.Popouts as BarPopouts
CustomMouseArea {
id: root
required property ShellScreen screen
required property BarPopouts.Wrapper popouts
required property ScreenState screenState
required property Panels panels
required property Bar.BarLoader bar
required property real borderThickness
required property bool fullscreen
property point dragStart
property bool dashboardShortcutActive
property bool osdShortcutActive
property bool utilitiesShortcutActive
function withinPanelHeight(panel: Item, x: real, y: real): bool {
const panelY = root.borderThickness + panel.y;
return y >= panelY - Config.border.rounding && y <= panelY + panel.height + Config.border.rounding;
}
function withinPanelWidth(panel: Item, x: real, y: real): bool {
const panelX = bar.implicitWidth + panel.x;
return x >= panelX - Config.border.rounding && x <= panelX + panel.width + Config.border.rounding;
}
function inLeftPanel(panel: Item, x: real, y: real): bool {
return x < bar.implicitWidth + panel.x + panel.width && withinPanelHeight(panel, x, y);
}
function inRightPanel(panel: Item, x: real, y: real): bool {
return x > Math.min(width - Config.border.minThickness, bar.implicitWidth + panel.x) && withinPanelHeight(panel, x, y);
}
function inTopPanel(panel: Item, x: real, y: real): bool {
const panelHeight = panel.height * (1 - (panel.offsetScale ?? 0)); // qmllint disable missing-property
return y < Math.max(Config.border.minThickness, Config.border.thickness + panelHeight) && withinPanelWidth(panel, x, y);
}
function inBottomPanel(panel: Item, x: real, y: real, isCorner = false): bool {
const panelHeight = panel.height * (1 - (panel.offsetScale ?? 0)); // qmllint disable missing-property
return y > height - Math.max(Config.border.minThickness, Config.border.thickness + panelHeight) - (isCorner ? Config.border.rounding : 0) && withinPanelWidth(panel, x, y);
}
function onWheel(event: WheelEvent): void {
if (fullscreen)
return;
if (event.x < bar.implicitWidth) {
bar.handleWheel(event.y, event.angleDelta);
}
}
anchors.fill: parent
acceptedButtons: fullscreen ? Qt.NoButton : Qt.AllButtons
hoverEnabled: true
onPressed: event => dragStart = Qt.point(event.x, event.y)
onContainsMouseChanged: {
if (!containsMouse) {
// Only hide if not activated by shortcut
if (!osdShortcutActive) {
screenState.osd = false;
root.panels.osd.hovered = false;
}
if (!dashboardShortcutActive)
screenState.dashboard = false;
if (!utilitiesShortcutActive)
screenState.utilities = false;
if (!popouts.currentName.startsWith("traymenu") || ((popouts.current as StackView)?.depth ?? 0) <= 1) {
popouts.hasCurrent = false;
bar.closeTray();
}
if (Config.bar.showOnHover)
bar.isHovered = false;
if (Config.sidebar.showOnHover)
screenState.sidebar = false;
}
}
onPositionChanged: event => {
if (popouts.isDetached)
return;
const x = event.x;
const y = event.y;
const dragX = x - dragStart.x;
const dragY = y - dragStart.y;
if (fullscreen) {
root.panels.osd.hovered = inRightPanel(panels.osdWrapper, x, y);
return;
}
// Show bar in non-exclusive mode on hover
if (!screenState.bar && Config.bar.showOnHover && x < bar.clampedWidth)
bar.isHovered = true;
// Show/hide bar on drag
if (pressed && dragStart.x < bar.clampedWidth) {
if (dragX > Config.bar.dragThreshold)
screenState.bar = true;
else if (dragX < -Config.bar.dragThreshold)
screenState.bar = false;
}
if (panels.sidebar.offsetScale === 1) {
// Show osd on hover
const showOsd = inRightPanel(panels.osdWrapper, x, y);
// Always update visibility based on hover if not in shortcut mode
if (!osdShortcutActive) {
screenState.osd = showOsd;
root.panels.osd.hovered = showOsd;
} else if (showOsd) {
// If hovering over OSD area while in shortcut mode, transition to hover control
osdShortcutActive = false;
root.panels.osd.hovered = true;
}
const showSidebar = pressed && dragStart.x > Math.min(width - Config.border.minThickness, bar.implicitWidth + panels.sidebar.x);
// Show sidebar on hover (top-right corner, bounded by notification panel height)
if (Config.sidebar.showOnHover) {
const sidebarTriggerY = Math.max(Config.sidebar.minHoverThreshold, panels.notifications.y + panels.notifications.height + borderThickness);
const showSidebarHover = x > Math.min(width - Config.border.minThickness, bar.implicitWidth + panels.sidebar.x) && y <= sidebarTriggerY;
if (showSidebarHover && !screenState.sidebar)
screenState.sidebar = true;
}
// Show/hide session on drag
if (pressed && inRightPanel(panels.sessionWrapper, dragStart.x, dragStart.y) && withinPanelHeight(panels.sessionWrapper, x, y)) {
if (dragX < -Config.session.dragThreshold)
screenState.session = true;
else if (dragX > Config.session.dragThreshold)
screenState.session = false;
// Show sidebar on drag if in session area and session is nearly fully visible
if (showSidebar && panels.session.offsetScale <= 0 && dragX < -Config.sidebar.dragThreshold)
screenState.sidebar = true;
} else if (showSidebar && dragX < -Config.sidebar.dragThreshold) {
// Show sidebar on drag if not in session area
screenState.sidebar = true;
}
} else {
const outOfSidebar = x < width - panels.sidebar.width * (1 - panels.sidebar.offsetScale);
// Show osd on hover
const showOsd = outOfSidebar && inRightPanel(panels.osdWrapper, x, y);
// Always update visibility based on hover if not in shortcut mode
if (!osdShortcutActive) {
screenState.osd = showOsd;
root.panels.osd.hovered = showOsd;
} else if (showOsd) {
// If hovering over OSD area while in shortcut mode, transition to hover control
osdShortcutActive = false;
root.panels.osd.hovered = true;
}
// Show/hide session on drag
if (pressed && outOfSidebar && inRightPanel(panels.sessionWrapper, dragStart.x, dragStart.y) && withinPanelHeight(panels.sessionWrapper, x, y)) {
if (dragX < -Config.session.dragThreshold)
screenState.session = true;
else if (dragX > Config.session.dragThreshold)
screenState.session = false;
}
// Show/hide sidebar on hover
if (Config.sidebar.showOnHover && !pressed) {
const sidebarTriggerY = Math.max(Config.sidebar.minHoverThreshold, panels.notifications.y + panels.notifications.height + borderThickness);
const showSidebarHover = x > Math.min(width - Config.border.minThickness, bar.implicitWidth + panels.sidebar.x) && y <= sidebarTriggerY;
if (showSidebarHover && !screenState.sidebar) {
screenState.sidebar = true;
} else {
const inSidebarArea = inRightPanel(panels.sidebar, x, y) || inRightPanel(panels.sessionWrapper, x, y);
if (!inSidebarArea)
screenState.sidebar = false;
}
}
// Hide sidebar on drag
if (pressed && inRightPanel(panels.sidebar, dragStart.x, 0) && dragX > Config.sidebar.dragThreshold)
screenState.sidebar = false;
}
// Show launcher on hover, or show/hide on drag if hover is disabled
if (Config.launcher.showOnHover) {
if (!screenState.launcher && inBottomPanel(panels.launcher, x, y))
screenState.launcher = true;
} else if (pressed && inBottomPanel(panels.launcher, dragStart.x, dragStart.y) && withinPanelWidth(panels.launcher, x, y)) {
if (dragY < -Config.launcher.dragThreshold)
screenState.launcher = true;
else if (dragY > Config.launcher.dragThreshold)
screenState.launcher = false;
}
// Show dashboard on hover
const showDashboard = Config.dashboard.showOnHover && inTopPanel(panels.dashboard, x, y);
// Always update visibility based on hover if not in shortcut mode
if (!dashboardShortcutActive) {
screenState.dashboard = showDashboard;
} else if (showDashboard) {
// If hovering over dashboard area while in shortcut mode, transition to hover control
dashboardShortcutActive = false;
}
// Show/hide dashboard on drag (for touchscreen devices)
if (pressed && inTopPanel(panels.dashboard, dragStart.x, dragStart.y) && withinPanelWidth(panels.dashboard, x, y)) {
if (dragY > Config.dashboard.dragThreshold)
screenState.dashboard = true;
else if (dragY < -Config.dashboard.dragThreshold)
screenState.dashboard = false;
}
// Show utilities on hover
const showUtilities = inBottomPanel(panels.utilities, x, y, true);
// Always update visibility based on hover if not in shortcut mode
if (!utilitiesShortcutActive) {
screenState.utilities = showUtilities;
} else if (showUtilities) {
// If hovering over utilities area while in shortcut mode, transition to hover control
utilitiesShortcutActive = false;
}
// Show popouts on hover
if (x < bar.implicitWidth) {
bar.checkPopout(y);
} else if ((!popouts.currentName.startsWith("traymenu") || ((popouts.current as StackView)?.depth ?? 0) <= 1) && !inLeftPanel(panels.popoutsWrapper, x, y)) {
popouts.hasCurrent = false;
bar.closeTray();
}
}
// Monitor individual visibility changes
Connections {
function onLauncherChanged() {
// If launcher is hidden, clear shortcut flags for dashboard and OSD
if (!root.screenState.launcher) {
root.dashboardShortcutActive = false;
root.osdShortcutActive = false;
root.utilitiesShortcutActive = false;
// Also hide dashboard and OSD if they're not being hovered
const inDashboardArea = root.inTopPanel(root.panels.dashboard, root.mouseX, root.mouseY);
const inOsdArea = root.inRightPanel(root.panels.osdWrapper, root.mouseX, root.mouseY);
if (!inDashboardArea) {
root.screenState.dashboard = false;
}
if (!inOsdArea) {
root.screenState.osd = false;
root.panels.osd.hovered = false;
}
}
}
function onDashboardChanged() {
if (root.screenState.dashboard) {
// Dashboard became visible, immediately check if this should be shortcut mode
const inDashboardArea = root.inTopPanel(root.panels.dashboard, root.mouseX, root.mouseY);
if (!inDashboardArea) {
root.dashboardShortcutActive = true;
}
} else {
// Dashboard hidden, clear shortcut flag
root.dashboardShortcutActive = false;
}
}
function onOsdChanged() {
if (root.screenState.osd) {
// OSD became visible, immediately check if this should be shortcut mode
const inOsdArea = root.inRightPanel(root.panels.osdWrapper, root.mouseX, root.mouseY);
if (!inOsdArea) {
root.osdShortcutActive = true;
}
} else {
// OSD hidden, clear shortcut flag
root.osdShortcutActive = false;
}
}
function onUtilitiesChanged() {
if (root.screenState.utilities) {
// Utilities became visible, immediately check if this should be shortcut mode
const inUtilitiesArea = root.inBottomPanel(root.panels.utilities, root.mouseX, root.mouseY);
if (!inUtilitiesArea) {
root.utilitiesShortcutActive = true;
}
} else {
// Utilities hidden, clear shortcut flag
root.utilitiesShortcutActive = false;
}
}
target: root.screenState
}
}
+1 -11
View File
@@ -14,7 +14,7 @@ WidgetBase {
id: root id: root
readonly property font font: Tokens.font.clock.family(Config.appearance.font.family.clock).build() readonly property font font: Tokens.font.clock.family(Config.appearance.font.family.clock).build()
readonly property color contentColor: screenState.dashboard ? Colors.palette.m3onPrimary : Colors.palette.m3onSurface readonly property color contentColor: Colors.palette.m3onSurface
readonly property string effectiveFormat: { readonly property string effectiveFormat: {
let fmt = Config.general.dateFormat; let fmt = Config.general.dateFormat;
if (!root.horizontal) if (!root.horizontal)
@@ -48,7 +48,6 @@ WidgetBase {
readonly property real size: horizontal ? timeText.contentWidth + Tokens.padding.medium * 2 : verticalColumn.implicitHeight + Tokens.padding.medium * 2 readonly property real size: horizontal ? timeText.contentWidth + Tokens.padding.medium * 2 : verticalColumn.implicitHeight + Tokens.padding.medium * 2
required property ScreenState screenState required property ScreenState screenState
color: screenState.dashboard ? Colors.palette.m3primary : Colors.tPalette.m3surfaceContainer
implicitHeight: horizontal ? baseSize : size implicitHeight: horizontal ? baseSize : size
implicitWidth: horizontal ? size : baseSize implicitWidth: horizontal ? size : baseSize
radius: Tokens.rounding.full radius: Tokens.rounding.full
@@ -142,13 +141,4 @@ WidgetBase {
} }
} }
} }
StateLayer {
acceptedButtons: Qt.LeftButton
color: root.contentColor
onClicked: {
root.screenState.dashboard = !root.screenState.dashboard;
}
}
} }
+1 -1
View File
@@ -179,7 +179,7 @@ Item {
CustomText { CustomText {
text: qsTr("Loading lyrics...") text: qsTr("Loading lyrics...")
color: Colors.palette.m3onSurfaceVariant color: Colors.palette.m3onSurfaceVariant
font: Tokens.font.body.normal font: Tokens.font.body.medium
} }
} }
+3 -3
View File
@@ -76,7 +76,7 @@ Item {
id: icon id: icon
anchors.verticalCenter: parent.verticalCenter anchors.verticalCenter: parent.verticalCenter
implicitSize: Tokens.font.size.extraLarge implicitSize: Tokens.font.icon.extraLarge.pointSize
source: Quickshell.iconPath(root.modelData?.icon) ?? "" source: Quickshell.iconPath(root.modelData?.icon) ?? ""
visible: !root.modelData?.isImage visible: !root.modelData?.isImage
} }
@@ -94,14 +94,14 @@ Item {
} }
sourceComponent: LoadingIndicator { sourceComponent: LoadingIndicator {
color: Colors.palette.m3primaryContainer color: Colors.palette.m3primaryContainer
implicitSize: Tokens.font.size.extraLarge implicitSize: Tokens.font.icon.extraLarge.pointSize
} }
} }
FadeImage { FadeImage {
id: image id: image
property int implicitSize: Tokens.font.size.extraLarge property int implicitSize: Tokens.font.icon.extraLarge.pointSize
width: implicitSize width: implicitSize
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
+1 -1
View File
@@ -70,7 +70,7 @@ Item {
anchors.centerIn: parent anchors.centerIn: parent
anchors.horizontalCenterOffset: implicitWidth > root.width ? -(implicitWidth - root.width) / 2 : 0 anchors.horizontalCenterOffset: implicitWidth > root.width ? -(implicitWidth - root.width) / 2 : 0
implicitHeight: Tokens.font.size.normal implicitHeight: Tokens.font.body.medium.pointSize
implicitWidth: fullWidth implicitWidth: fullWidth
interactive: false interactive: false
orientation: Qt.Horizontal orientation: Qt.Horizontal
@@ -6,138 +6,138 @@ import qs.Services
import qs.Modules.Notifications.Sidebar.Chat import qs.Modules.Notifications.Sidebar.Chat
Item { Item {
id: root id: root
property int animOff property int animOff
property Item currentItem property Item currentItem
property bool noAnim: false property bool noAnim: false
property bool loading: false property bool loading: false
property int lastIdx: -1 property int lastIdx: -1
readonly property Component conversationComp: ChatContent {} readonly property Component conversationComp: ChatContent {}
signal requestClose signal requestClose
function loadConversation(chat): void { function loadConversation(chat): void {
if (currentItem) { if (currentItem) {
currentItem.destroy(); currentItem.destroy();
currentItem = null; currentItem = null;
} }
if (!chat) if (!chat)
return; return;
root.loading = true; root.loading = true;
const incubator = root.conversationComp.incubateObject(container, { const incubator = root.conversationComp.incubateObject(container, {
chatData: chat chatData: chat
}); });
const attach = () => { const attach = () => {
incubator.object.anchors.fill = container; incubator.object.anchors.fill = container;
incubator.object.requestClose.connect(root.requestClose); incubator.object.requestClose.connect(root.requestClose);
currentItem = incubator.object; currentItem = incubator.object;
root.loading = false; root.loading = false;
if (!noAnim) if (!noAnim)
enterAnim.start(); enterAnim.start();
}; };
if (incubator.status === Component.Ready) if (incubator.status === Component.Ready)
attach(); attach();
else else
incubator.onStatusChanged = status => { incubator.onStatusChanged = status => {
if (status === Component.Ready) if (status === Component.Ready)
attach(); attach();
}; };
} }
Item { Item {
id: container id: container
anchors.fill: parent anchors.fill: parent
layer.enabled: opacity < 1 layer.enabled: opacity < 1
objectName: "ConversationContainer" objectName: "ConversationContainer"
Component.onCompleted: { Component.onCompleted: {
if (ChatState.chatSession) if (ChatState.chatSession)
root.loadConversation(ChatState.chatSession); root.loadConversation(ChatState.chatSession);
} }
} }
LoadingIndicator { LoadingIndicator {
anchors.centerIn: parent anchors.centerIn: parent
implicitSize: Tokens.font.size.extraLarge * 4 implicitSize: Tokens.font.icon.large.pointSize * 4
opacity: root.loading ? 1 : 0 opacity: root.loading ? 1 : 0
visible: opacity > 0 visible: opacity > 0
Behavior on opacity { Behavior on opacity {
Anim {} Anim {}
} }
} }
Connections { Connections {
function onChatSessionChanged(): void { function onChatSessionChanged(): void {
exitAnim.complete(); exitAnim.complete();
enterAnim.complete(); enterAnim.complete();
if (root.noAnim) { if (root.noAnim) {
root.loadConversation(ChatState.chatSession); root.loadConversation(ChatState.chatSession);
return; return;
} }
root.animOff = Tokens.padding.small * (ChatState.currentIdx > root.lastIdx ? 1 : -1); root.animOff = Tokens.padding.small * (ChatState.currentIdx > root.lastIdx ? 1 : -1);
root.lastIdx = ChatState.currentIdx; root.lastIdx = ChatState.currentIdx;
exitAnim.start(); exitAnim.start();
} }
target: ChatState target: ChatState
} }
SequentialAnimation { SequentialAnimation {
id: exitAnim id: exitAnim
Anim { Anim {
property: "opacity" property: "opacity"
target: container target: container
to: 0 to: 0
type: Anim.DefaultEffects type: Anim.DefaultEffects
} }
ScriptAction { ScriptAction {
script: root.loadConversation(ChatState.chatSession) script: root.loadConversation(ChatState.chatSession)
} }
} }
SequentialAnimation { SequentialAnimation {
id: enterAnim id: enterAnim
PropertyAction { PropertyAction {
property: "topMargin" property: "topMargin"
target: container.anchors target: container.anchors
value: root.animOff value: root.animOff
} }
PropertyAction { PropertyAction {
property: "bottomMargin" property: "bottomMargin"
target: container.anchors target: container.anchors
value: -root.animOff value: -root.animOff
} }
ParallelAnimation { ParallelAnimation {
Anim { Anim {
from: 0 from: 0
property: "opacity" property: "opacity"
target: container target: container
to: 1 to: 1
type: Anim.SlowEffects type: Anim.SlowEffects
} }
Anim { Anim {
properties: "topMargin,bottomMargin" properties: "topMargin,bottomMargin"
target: container.anchors target: container.anchors
to: 0 to: 0
type: Anim.SlowEffects type: Anim.SlowEffects
} }
} }
} }
} }
@@ -9,7 +9,7 @@ Item {
required property string latex required property string latex
property color mathColor: Colors.palette.m3onSurface property color mathColor: Colors.palette.m3onSurface
property real fontSize: Tokens.font.size.large property real fontSize: Tokens.font.body.large.pointSize
implicitHeight: Math.max(equationImage.height, fallbackText.contentHeight) + Tokens.padding.small * 2 implicitHeight: Math.max(equationImage.height, fallbackText.contentHeight) + Tokens.padding.small * 2
@@ -16,7 +16,7 @@ Item {
property int breakpoint: Math.round(Config.sidebar.sizes.width * 2) + Tokens.spacing.medium * 2 + Tokens.padding.medium * 3 property int breakpoint: Math.round(Config.sidebar.sizes.width * 2) + Tokens.spacing.medium * 2 + Tokens.padding.medium * 3
property color blobColor: Colors.tPalette.m3surfaceContainerLow property color blobColor: Colors.tPalette.m3surfaceContainerLow
readonly property int iconSize: Math.round(Tokens.font.size.extraLarge * (96 / 72)) + Tokens.padding.large * 2 readonly property int iconSize: Math.round(Tokens.font.icon.extraLarge.pointSize * (96 / 72)) + Tokens.padding.large * 2
property alias conversationModel: sidebar.model property alias conversationModel: sidebar.model
property bool chatOpen: ChatState.chatSession !== null property bool chatOpen: ChatState.chatSession !== null
@@ -56,7 +56,7 @@ ColumnLayout {
Layout.fillWidth: true Layout.fillWidth: true
Layout.rightMargin: -Tokens.spacing.small Layout.rightMargin: -Tokens.spacing.small
clip: true clip: true
implicitHeight: (Tokens.font.size.larger + Tokens.padding.extraSmall) * (root.screenState.recordingListExpanded ? 10 : 3) implicitHeight: (Tokens.font.body.large.pointSize + Tokens.padding.extraSmall) * (root.screenState.recordingListExpanded ? 10 : 3)
CustomScrollBar.vertical: CustomScrollBar { CustomScrollBar.vertical: CustomScrollBar {
flickable: list flickable: list
+1 -1
View File
@@ -56,7 +56,7 @@ PageBase {
IconImage { IconImage {
asynchronous: true asynchronous: true
implicitSize: Math.round(Tokens.font.size.large * 1.8) implicitSize: Math.round(Tokens.font.icon.large * 1.8)
source: Quickshell.iconPath(appItem.modelData.icon, "image-missing") source: Quickshell.iconPath(appItem.modelData.icon, "image-missing")
} }
+1 -1
View File
@@ -47,7 +47,7 @@ PageBase {
IconImage { IconImage {
asynchronous: true asynchronous: true
implicitSize: Math.round(Tokens.font.size.large * 3) implicitSize: Math.round(Tokens.font.icon.large.pointSize * 3)
source: Quickshell.iconPath(root.app?.icon, "image-missing") source: Quickshell.iconPath(root.app?.icon, "image-missing")
} }
+1 -1
View File
@@ -143,7 +143,7 @@ PageBase {
IconImage { IconImage {
asynchronous: true asynchronous: true
implicitSize: Math.round(Tokens.font.size.large * 1.8) implicitSize: Math.round(Tokens.font.icon.large.pointSize * 1.8)
source: Quickshell.iconPath(appItem.modelData.icon, "image-missing") source: Quickshell.iconPath(appItem.modelData.icon, "image-missing")
} }
+1 -1
View File
@@ -60,7 +60,7 @@ Gpu::Gpu(QObject* parent) : TickingService(parent) {
[this, configPath]() { [this, configPath]() {
QTimer::singleShot(100, this, [this, configPath]() { QTimer::singleShot(100, this, [this, configPath]() {
QFile file(configPath); QFile file(configPath);
if (file.exists()) { if (file.open(QIODevice::ReadOnly)) {
QJsonDocument doc = QJsonDocument doc =
QJsonDocument::fromJson(file.readAll()); QJsonDocument::fromJson(file.readAll());
if (!doc.isNull()) { if (!doc.isNull()) {
+1 -1
View File
@@ -44,7 +44,7 @@ TickingService::TickingService(QObject* parent)
[this, configPath]() { [this, configPath]() {
QTimer::singleShot(100, this, [this, configPath]() { QTimer::singleShot(100, this, [this, configPath]() {
QFile file(configPath); QFile file(configPath);
if (!file.exists()) { if (!file.open(QIODevice::ReadOnly)) {
return; return;
} }
QJsonDocument doc = QJsonDocument::fromJson(file.readAll()); QJsonDocument doc = QJsonDocument::fromJson(file.readAll());