Set logo for info dialog via code

Set the logo for the info dialog via code instead of UI file to fix
sizing issue.
This commit is contained in:
coderkun 2021-04-18 16:50:43 +02:00
parent faec824e8b
commit f843cc629d
2 changed files with 5 additions and 2 deletions

View file

@ -13,7 +13,7 @@
<property name="version">2.1.2</property> <property name="version">2.1.2</property>
<property name="comments" translatable="yes">CoverGrid is a client for the Music Player Daemon, focusing on albums instead of single tracks.</property> <property name="comments" translatable="yes">CoverGrid is a client for the Music Player Daemon, focusing on albums instead of single tracks.</property>
<property name="website">http://www.suruatoel.xyz/codes/mcg</property> <property name="website">http://www.suruatoel.xyz/codes/mcg</property>
<property name="logo-icon-name">mcg</property> <property name="logo-icon-name"/>
<property name="license-type">gpl-3-0</property> <property name="license-type">gpl-3-0</property>
<child internal-child="vbox"> <child internal-child="vbox">
<object class="GtkBox"> <object class="GtkBox">

View file

@ -5,7 +5,7 @@ import gi
gi.require_version('Gtk', '3.0') gi.require_version('Gtk', '3.0')
import logging import logging
from gi.repository import Gtk, GObject, GdkPixbuf from gi.repository import Gtk, GdkPixbuf
@ -19,3 +19,6 @@ class InfoDialog(Gtk.AboutDialog):
super().__init__() super().__init__()
self._logger = logging.getLogger(__name__) self._logger = logging.getLogger(__name__)
self.set_logo(
GdkPixbuf.Pixbuf.new_from_resource("/xyz/suruatoel/mcg/icons/mcg.svg")
)