Skip to content

Commit 53d837a

Browse files
stopwatch@KopfdesDaemons: Add hover effect for buttons (#1591)
1 parent 97717c7 commit 53d837a

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

stopwatch@KopfdesDaemons/files/stopwatch@KopfdesDaemons/desklet.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class StopwatchDesklet extends Desklet.Desklet {
110110

111111
const createButton = (iconName, callback) => {
112112
const icon = this._getImageAtScale(`${this.metadata.path}/${iconName}.svg`, buttonHeight, buttonHeight);
113-
const button = new St.Button({ child: icon });
113+
const button = new St.Button({ child: icon, style_class: "stopwatch-button" });
114114
button.connect("clicked", callback.bind(this));
115115
return button;
116116
};
@@ -136,7 +136,7 @@ class StopwatchDesklet extends Desklet.Desklet {
136136
_rgbToRgba(colorString) {
137137
const match = colorString.match(/\d+/g);
138138
if (match && match.length === 3) {
139-
return match.map(Number).map((c) => c / 255);
139+
return match.map(Number).map(c => c / 255);
140140
}
141141
return [0.3, 0.8, 0.5]; // Default color if parsing fails
142142
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.stopwatch-button:hover {
2+
background-color: rgba(143, 143, 143, 0.411);
3+
border-radius: 4px;
4+
}

0 commit comments

Comments
 (0)