add powerButton size argument

This commit is contained in:
piotr
2024-02-01 04:09:31 +01:00
parent 01c26ba092
commit 6da6787272
2 changed files with 20 additions and 19 deletions

View File

@@ -295,9 +295,9 @@ func powerButton(iconPath, command string) *gtk.Button {
var img *gtk.Image
var err error
//pixbuf, err = createPixbuf(iconPath, *iconSize)
pixbuf, err = gdk.PixbufNewFromFileAtSize(iconPath, *iconSize, *iconSize)
pixbuf, err = gdk.PixbufNewFromFileAtSize(iconPath, *pbSize, *pbSize)
if err != nil {
pixbuf, _ = createPixbuf("unknown", *iconSize)
pixbuf, _ = createPixbuf("unknown", *pbSize)
log.Warnf("Couldn't find icon %s", iconPath)
}
img, _ = gtk.ImageNewFromPixbuf(pixbuf)