style: reduce margins and border spacing around standalone hamster widget

This commit is contained in:
Sho 2026-08-01 23:49:53 +09:00
parent 4d202257b7
commit 90634d2977

View File

@ -29,29 +29,28 @@ PanelWindow {
// Standalone Bigger Running Hamster Engine Card (Bottom Left) // Standalone Bigger Running Hamster Engine Card (Bottom Left)
Rectangle { Rectangle {
id: card id: card
implicitWidth: 190 implicitWidth: 162
implicitHeight: 205 implicitHeight: 184
radius: 18 radius: 16
color: Theme.surface color: Theme.surface
border.color: Qt.rgba(Theme.accent.r, Theme.accent.g, Theme.accent.b, 0.35) border.color: Qt.rgba(Theme.accent.r, Theme.accent.g, Theme.accent.b, 0.35)
border.width: 1.5 border.width: 1.5
ColumnLayout { ColumnLayout {
anchors.fill: parent anchors.fill: parent
anchors.margins: 6 anchors.margins: 3
spacing: 2 spacing: 0
// Hamster GIF Image (Tight fit with minimal border space & bigger size) // Hamster GIF Image (Maximizes GIF bounds with minimal border gap)
Item { Item {
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
Layout.fillWidth: true Layout.fillWidth: true
implicitHeight: 155 implicitHeight: 145
AnimatedImage { AnimatedImage {
id: hamsterGif id: hamsterGif
anchors.centerIn: parent anchors.fill: parent
width: 150 anchors.margins: 0
height: 150
source: "file://" + Quickshell.env("HOME") + "/.config/quickshell/assets/hampter_transparent.gif" source: "file://" + Quickshell.env("HOME") + "/.config/quickshell/assets/hampter_transparent.gif"
fillMode: Image.PreserveAspectFit fillMode: Image.PreserveAspectFit
smooth: true smooth: true
@ -63,7 +62,7 @@ PanelWindow {
Text { Text {
text: "🐹 Hamster Engine" text: "🐹 Hamster Engine"
color: Theme.accent color: Theme.accent
font.pixelSize: 12 font.pixelSize: 11
font.weight: Font.Bold font.weight: Font.Bold
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
} }
@ -71,7 +70,7 @@ PanelWindow {
Text { Text {
text: (60 + SystemMonitorService.cpuPct * 3) + " RPM • " + (SystemMonitorService.cpuPct > 70 ? "🔥 Sprinting" : (SystemMonitorService.cpuPct > 20 ? "⚡ Running" : "💤 Trotting")) text: (60 + SystemMonitorService.cpuPct * 3) + " RPM • " + (SystemMonitorService.cpuPct > 70 ? "🔥 Sprinting" : (SystemMonitorService.cpuPct > 20 ? "⚡ Running" : "💤 Trotting"))
color: Theme.comment color: Theme.comment
font.pixelSize: 10 font.pixelSize: 9.5
Layout.alignment: Qt.AlignHCenter Layout.alignment: Qt.AlignHCenter
} }
} }