Skip to content

Commit 12a2cda

Browse files
committed
set app icon
1 parent d170d07 commit 12a2cda

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

auto_cpufreq/gui/app.py

+3-8
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
gi.require_version("Gtk", "3.0")
44

5-
from gi.repository import Gtk, GLib, Gdk, Gio
5+
from gi.repository import Gtk, GLib, Gdk, Gio, GdkPixbuf
66

77
import os
88
import sys
@@ -22,13 +22,8 @@ def __init__(self):
2222
self.set_border_width(10)
2323
self.set_resizable(False)
2424
self.load_css()
25-
26-
settings = Gtk.Settings.get_default()
27-
# Theme
28-
theme = os.environ.get("GTK_THEME")
29-
# if theme is not None:
30-
# settings.set_property("gtk-theme-name", theme)
31-
25+
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(filename="/usr/local/share/auto-cpufreq/images/icon.png", width=500, height=500, preserve_aspect_ratio=True)
26+
self.set_icon(pixbuf)
3227
self.build()
3328

3429
def main(self):

0 commit comments

Comments
 (0)