diff --git a/.config/quickshell/modules/common/Appearance.qml b/.config/quickshell/modules/common/Appearance.qml index 7a247bc9c..a02934968 100644 --- a/.config/quickshell/modules/common/Appearance.qml +++ b/.config/quickshell/modules/common/Appearance.qml @@ -228,6 +228,7 @@ Singleton { property int barCenterSideModuleWidth: 360 property int barPreferredSideSectionWidth: 400 property int sidebarWidth: 450 + property int sidebarWidthExtended: 700 property int notificationPopupWidth: 410 property int searchWidthCollapsed: 260 property int searchWidth: 450 diff --git a/.config/quickshell/modules/common/widgets/StyledToolTip.qml b/.config/quickshell/modules/common/widgets/StyledToolTip.qml index a0e7ced7e..838129351 100644 --- a/.config/quickshell/modules/common/widgets/StyledToolTip.qml +++ b/.config/quickshell/modules/common/widgets/StyledToolTip.qml @@ -63,6 +63,7 @@ ToolTip { anchors.centerIn: parent text: content font.pixelSize: Appearance.font.pixelSize.smaller + font.hintingPreference: Font.PreferNoHinting // Prevent shaky text color: Appearance.colors.colOnTooltip wrapMode: Text.Wrap } diff --git a/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml b/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml index 717196b53..b97943af7 100644 --- a/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml +++ b/.config/quickshell/modules/sidebarLeft/SidebarLeft.qml @@ -14,7 +14,6 @@ import Quickshell.Hyprland Scope { // Scope id: root - property int sidebarWidth: Appearance.sizes.sidebarWidth property int sidebarPadding: 15 property var tabButtonList: [{"icon": "neurology", "name": qsTr("Intelligence")}, {"icon": "bookmark_heart", "name": qsTr("Anime")}] @@ -27,6 +26,8 @@ Scope { // Scope visible: false focusable: true property int currentTab: 0 + property bool extend: false + property real sidebarWidth: sidebarRoot.extend ? Appearance.sizes.sidebarWidthExtended : Appearance.sizes.sidebarWidth onVisibleChanged: { GlobalStates.sidebarLeftOpenCount += visible ? 1 : -1 @@ -36,7 +37,7 @@ Scope { // Scope screen: modelData exclusiveZone: 0 - width: sidebarWidth + width: Appearance.sizes.sidebarWidthExtended WlrLayershell.namespace: "quickshell:sidebarLeft" WlrLayershell.keyboardFocus: WlrKeyboardFocus.Exclusive color: "transparent" @@ -47,6 +48,10 @@ Scope { // Scope bottom: true } + mask: Region { + item: sidebarLeftBackground + } + HyprlandFocusGrab { // Click outside to close id: grab windows: [ sidebarRoot ] @@ -76,14 +81,26 @@ Scope { // Scope Rectangle { id: sidebarLeftBackground - anchors.centerIn: parent - width: parent.width - Appearance.sizes.hyprlandGapsOut * 2 + anchors.top: parent.top + anchors.left: parent.left + anchors.topMargin: Appearance.sizes.hyprlandGapsOut + anchors.leftMargin: Appearance.sizes.hyprlandGapsOut + width: sidebarWidth - Appearance.sizes.hyprlandGapsOut * 2 height: parent.height - Appearance.sizes.hyprlandGapsOut * 2 color: Appearance.colors.colLayer0 radius: Appearance.rounding.screenRounding - Appearance.sizes.elevationMargin + 1 focus: sidebarRoot.visible + Behavior on width { + NumberAnimation { + duration: Appearance.animation.elementMove.duration + easing.type: Appearance.animation.elementMove.type + easing.bezierCurve: Appearance.animation.elementMove.bezierCurve + } + } + Keys.onPressed: (event) => { + // console.log("Key pressed: " + event.key) if (event.key === Qt.Key_Escape) { sidebarRoot.visible = false; } @@ -100,6 +117,10 @@ Scope { // Scope else if (event.key === Qt.Key_Backtab) { sidebarRoot.currentTab = (sidebarRoot.currentTab - 1 + root.tabButtonList.length) % root.tabButtonList.length; } + else if (event.key === Qt.Key_O) { + console.log("Extending sidebar") + sidebarRoot.extend = !sidebarRoot.extend; + } event.accepted = true; } } diff --git a/.config/quickshell/modules/sidebarLeft/aiChat/AiMessage.qml b/.config/quickshell/modules/sidebarLeft/aiChat/AiMessage.qml index 7ecbe42dc..cfba5c426 100644 --- a/.config/quickshell/modules/sidebarLeft/aiChat/AiMessage.qml +++ b/.config/quickshell/modules/sidebarLeft/aiChat/AiMessage.qml @@ -50,7 +50,7 @@ Rectangle { RowLayout { id: nameRowLayout anchors.centerIn: parent - spacing: 10 + spacing: 5 Item { Layout.alignment: Qt.AlignVCenter