bar: more intuitive buttons, topleft icon

This commit is contained in:
end-4
2025-04-27 23:48:30 +02:00
parent ab9b17a188
commit cc69a4bac4
3 changed files with 34 additions and 4 deletions
@@ -12,7 +12,6 @@ Item {
height: parent.height height: parent.height
width: colLayout.width width: colLayout.width
Layout.leftMargin: Appearance.rounding.screenRounding
ColumnLayout { ColumnLayout {
+33 -3
View File
@@ -1,9 +1,11 @@
import "root:/"
import "root:/modules/common" import "root:/modules/common"
import "root:/modules/common/widgets" import "root:/modules/common/widgets"
import "root:/services" import "root:/services"
import QtQuick import QtQuick
import QtQuick.Controls import QtQuick.Controls
import QtQuick.Layouts import QtQuick.Layouts
import Qt5Compat.GraphicalEffects
import Quickshell import Quickshell
import Quickshell.Hyprland import Quickshell.Hyprland
import Quickshell.Io import Quickshell.Io
@@ -51,6 +53,34 @@ Scope {
anchors.left: parent.left anchors.left: parent.left
implicitHeight: barHeight implicitHeight: barHeight
width: (barRoot.width - middleSection.width) / 2 width: (barRoot.width - middleSection.width) / 2
spacing: 10
Rectangle {
Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter
Layout.leftMargin: Appearance.rounding.screenRounding
Layout.fillWidth: false
// Layout.fillHeight: true
radius: Appearance.rounding.full
color: (barLeftSideMouseArea.pressed || GlobalStates.sidebarLeftOpenCount > 0) ? Appearance.colors.colLayer1Active : barLeftSideMouseArea.hovered ? Appearance.colors.colLayer1Hover : "transparent"
implicitWidth: distroIcon.width + 5*2
implicitHeight: distroIcon.height + 5*2
CustomIcon {
id: distroIcon
anchors.centerIn: parent
width: 19.5
height: 19.5
source: ConfigOptions.bar.topLeftIcon == 'distro' ?
SystemInfo.distroIcon : "google-gemini-symbolic"
}
ColorOverlay {
anchors.fill: distroIcon
source: distroIcon
color: Appearance.colors.colOnLayer0
}
}
ActiveWindow { ActiveWindow {
Layout.fillWidth: true Layout.fillWidth: true
@@ -124,11 +154,11 @@ Scope {
Layout.margins: 4 Layout.margins: 4
Layout.rightMargin: Appearance.rounding.screenRounding Layout.rightMargin: Appearance.rounding.screenRounding
Layout.fillHeight: true Layout.fillHeight: true
implicitWidth: rowLayout.implicitWidth + 10*2 implicitWidth: indicatorsRowLayout.implicitWidth + 10*2
radius: Appearance.rounding.full radius: Appearance.rounding.full
color: barRightSideMouseArea.pressed ? Appearance.colors.colLayer1Active : barRightSideMouseArea.hovered ? Appearance.colors.colLayer1Hover : "transparent" color: (barRightSideMouseArea.pressed || GlobalStates.sidebarRightOpenCount > 0) ? Appearance.colors.colLayer1Active : barRightSideMouseArea.hovered ? Appearance.colors.colLayer1Hover : "transparent"
RowLayout { RowLayout {
id: rowLayout id: indicatorsRowLayout
anchors.centerIn: parent anchors.centerIn: parent
spacing: 15 spacing: 15
@@ -19,6 +19,7 @@ Singleton {
property QtObject bar: QtObject { property QtObject bar: QtObject {
property int batteryLowThreshold: 20 property int batteryLowThreshold: 20
property string topLeftIcon: "gemini" // Options: distro, gemini
property QtObject resources: QtObject { property QtObject resources: QtObject {
property bool alwaysShowSwap: true property bool alwaysShowSwap: true
property bool alwaysShowCpu: false property bool alwaysShowCpu: false