diff --git a/dots/.config/quickshell/ii/modules/common/Appearance.qml b/dots/.config/quickshell/ii/modules/common/Appearance.qml index 818417360..d873e3841 100644 --- a/dots/.config/quickshell/ii/modules/common/Appearance.qml +++ b/dots/.config/quickshell/ii/modules/common/Appearance.qml @@ -152,6 +152,7 @@ Singleton { property color colPrimaryContainerActive: ColorUtils.mix(colors.colPrimaryContainer, colors.colOnPrimaryContainer, 0.8) property color colOnPrimaryContainer: m3colors.m3onPrimaryContainer property color colSecondary: m3colors.m3secondary + property color colOnSecondary: m3colors.m3onSecondary property color colSecondaryHover: ColorUtils.mix(m3colors.m3secondary, colLayer1Hover, 0.85) property color colSecondaryActive: ColorUtils.mix(m3colors.m3secondary, colLayer1Active, 0.4) property color colSecondaryContainer: m3colors.m3secondaryContainer diff --git a/dots/.config/quickshell/ii/modules/common/Config.qml b/dots/.config/quickshell/ii/modules/common/Config.qml index a9289d83b..2ff5d7772 100644 --- a/dots/.config/quickshell/ii/modules/common/Config.qml +++ b/dots/.config/quickshell/ii/modules/common/Config.qml @@ -175,7 +175,7 @@ Singleton { property bool enableWorkspace: true property real workspaceZoom: 1.07 // Relative to your screen, not wallpaper size property bool enableSidebar: true - property real clockFactor: 1.13 + property real clockFactor: 1.2 } } diff --git a/dots/.config/quickshell/ii/modules/settings/GeneralConfig.qml b/dots/.config/quickshell/ii/modules/settings/GeneralConfig.qml index 565758468..2ce3ef652 100644 --- a/dots/.config/quickshell/ii/modules/settings/GeneralConfig.qml +++ b/dots/.config/quickshell/ii/modules/settings/GeneralConfig.qml @@ -4,6 +4,7 @@ import Quickshell.Io import QtQuick.Layouts import qs.services import qs.modules.common +import qs.modules.common.functions import qs.modules.common.widgets ContentPage { diff --git a/dots/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml b/dots/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml index 271096f88..280c57583 100644 --- a/dots/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml +++ b/dots/.config/quickshell/ii/modules/sidebarLeft/AiChat.qml @@ -321,12 +321,14 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\) } ScrollEdgeFade { + z: 1 target: messageListView vertical: true } StyledListView { // Message list id: messageListView + z: 0 anchors.fill: parent spacing: 10 popin: false @@ -362,11 +364,17 @@ Inline w/ backslash and round brackets \\(e^{i\\pi} + 1 = 0\\) } PagePlaceholder { + z: 2 shown: Ai.messageIDs.length === 0 icon: "neurology" title: Translation.tr("Large language models") description: Translation.tr("Type /key to get started with online models\nCtrl+O to expand the sidebar\nCtrl+P to detach sidebar into a window") } + + ScrollToBottomButton { + z: 3 + target: messageListView + } } DescriptionBox { diff --git a/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml b/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml index dbfd90d8e..42c314a10 100644 --- a/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml +++ b/dots/.config/quickshell/ii/modules/sidebarLeft/Anime.qml @@ -152,12 +152,14 @@ Item { } ScrollEdgeFade { + z: 1 target: booruResponseListView vertical: true } StyledListView { // Booru responses id: booruResponseListView + z: 0 anchors.fill: parent spacing: 10 @@ -187,13 +189,20 @@ Item { PagePlaceholder { id: placeholderItem + z: 2 shown: root.responses.length === 0 icon: "bookmark_heart" title: Translation.tr("Anime boorus") description: "" } + ScrollToBottomButton { + z: 3 + target: booruResponseListView + } + Item { // Queries awaiting response + z: 4 anchors.left: parent.left anchors.right: parent.right anchors.bottom: parent.bottom diff --git a/dots/.config/quickshell/ii/modules/sidebarLeft/ScrollToBottomButton.qml b/dots/.config/quickshell/ii/modules/sidebarLeft/ScrollToBottomButton.qml new file mode 100644 index 000000000..59ed599a6 --- /dev/null +++ b/dots/.config/quickshell/ii/modules/sidebarLeft/ScrollToBottomButton.qml @@ -0,0 +1,57 @@ +import qs.services +import qs.modules.common +import qs.modules.common.widgets +import QtQuick +import QtQuick.Layouts + +RippleButton { + id: root + required property ListView target + + anchors { + bottom: parent.bottom + horizontalCenter: parent.horizontalCenter + bottomMargin: 10 + } + + opacity: !target.atYEnd ? 1 : 0 + scale: !target.atYEnd ? 1 : 0.7 + visible: opacity > 0 + Behavior on opacity { + animation: Appearance.animation.elementMoveFast.numberAnimation.createObject(this) + } + Behavior on scale { + animation: Appearance.animation.elementResize.numberAnimation.createObject(this) + } + + implicitWidth: contentItem.implicitWidth + 8 * 2 + implicitHeight: contentItem.implicitHeight + 4 * 2 + + colBackground: Appearance.colors.colSecondary + colBackgroundHover: Appearance.colors.colSecondaryHover + colRipple: Appearance.colors.colSecondaryActive + buttonRadius: Appearance.rounding.verysmall + + downAction: () => { + target.positionViewAtEnd() + } + + contentItem: Row { + id: contentItem + spacing: 4 + MaterialSymbol { + anchors.verticalCenter: parent.verticalCenter + text: "arrow_downward" + font.pixelSize: Appearance.font.pixelSize.larger + color: Appearance.colors.colOnSecondary + verticalAlignment: Text.AlignVCenter + } + StyledText { + anchors.verticalCenter: parent.verticalCenter + text: Translation.tr("Scroll to Bottom") + font.pixelSize: Appearance.font.pixelSize.smallie + color: Appearance.colors.colOnSecondary + verticalAlignment: Text.AlignVCenter + } + } +} diff --git a/dots/.config/quickshell/ii/services/Translation.qml b/dots/.config/quickshell/ii/services/Translation.qml index aff9d69a3..71e176869 100644 --- a/dots/.config/quickshell/ii/services/Translation.qml +++ b/dots/.config/quickshell/ii/services/Translation.qml @@ -4,7 +4,6 @@ import QtQuick import Quickshell import Quickshell.Io import qs.modules.common -import qs.modules.common.functions Singleton { id: root