Skip to content

Commit 0b32933

Browse files
committed
cs_info: Keep system image a reasonable size.
1 parent 30a8144 commit 0b32933

File tree

1 file changed

+6
-3
lines changed
  • files/usr/share/cinnamon/cinnamon-settings/modules

1 file changed

+6
-3
lines changed

files/usr/share/cinnamon/cinnamon-settings/modules/cs_info.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
import threading
99
from json import loads
1010

11+
from gi.repository import GdkPixbuf
12+
1113
from SettingsWidgets import SidePage
1214
from xapp.GSettingsWidgets import *
1315

14-
1516
def killProcess(process):
1617
process.kill()
1718

@@ -97,7 +98,7 @@ def getSystemIcon():
9798
schema = Gio.Settings(schema="org.cinnamon")
9899

99100
iconPath = schema.get_string("system-icon-path")
100-
if iconPath is "": # left empty, so its disabled
101+
if iconPath == "": # left empty, so its disabled
101102
return None
102103

103104
return iconPath
@@ -177,6 +178,7 @@ def on_module_selected(self):
177178
infos = createSystemInfos()
178179

179180
page = SettingsPage()
181+
page.set_spacing(10)
180182
self.sidePage.add_widget(page)
181183

182184
settings = page.add_section(_("System info"))
@@ -216,7 +218,8 @@ def on_module_selected(self):
216218

217219
systemIconPath = getSystemIcon()
218220
if systemIconPath is not None:
219-
systemIcon = Gtk.Image.new_from_file(systemIconPath)
221+
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale (systemIconPath, -1, 160, True)
222+
systemIcon = Gtk.Image.new_from_pixbuf(pixbuf)
220223
page.add(systemIcon)
221224

222225

0 commit comments

Comments
 (0)