Set plugin icon to 24x24 regardless of the file size
This commit is contained in:
parent
cfb45c609a
commit
71b7f4626e
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.18.3 -->
|
||||
<!-- Generated with glade 3.22.2 -->
|
||||
<!--
|
||||
~ Safe Eyes is a utility to remind you to take break frequently
|
||||
~ to protect your eyes from eye strain.
|
||||
|
@ -39,6 +39,10 @@
|
|||
<property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
<property name="margin_left">2</property>
|
||||
<property name="margin_right">2</property>
|
||||
<property name="margin_top">2</property>
|
||||
<property name="margin_bottom">2</property>
|
||||
<property name="stock">gtk-about</property>
|
||||
</object>
|
||||
<packing>
|
||||
|
|
|
@ -220,7 +220,11 @@ class SettingsDialog:
|
|||
if plugin_config.get('break_override_allowed', False):
|
||||
self.plugin_map[plugin_config['id']] = plugin_config['meta']['name']
|
||||
if plugin_config['icon']:
|
||||
builder.get_object('img_plugin_icon').set_from_file(plugin_config['icon'])
|
||||
pixbuf = GdkPixbuf.Pixbuf.new_from_file_at_scale(plugin_config['icon'],
|
||||
width=24,
|
||||
height=24,
|
||||
preserve_aspect_ratio=False)
|
||||
builder.get_object('img_plugin_icon').set_from_pixbuf(pixbuf)
|
||||
if plugin_config['settings']:
|
||||
btn_properties.set_sensitive(True)
|
||||
btn_properties.connect('clicked', lambda button: self.__show_plugins_properties_dialog(plugin_config))
|
||||
|
|
Loading…
Reference in New Issue