gui: add icon and app title

This commit is contained in:
Sebastien Bourdeauducq 2014-12-30 18:40:19 +08:00
parent 9de3a08676
commit 1ada80cd6d
3 changed files with 16 additions and 3 deletions

BIN
artiq/gui/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

View File

@ -3,6 +3,7 @@ import asyncio
from gi.repository import Gtk
from artiq.gui.tools import Window
from artiq.management.sync_struct import Subscriber
@ -77,10 +78,9 @@ class _PeriodicStoreSyncer:
del self.order[i]
class SchedulerWindow(Gtk.Window):
class SchedulerWindow(Window):
def __init__(self):
Gtk.Window.__init__(self, title="Scheduler")
self.set_border_width(6)
Window.__init__(self, title="Scheduler")
self.set_default_size(720, 570)
vpane = Gtk.VPaned()

13
artiq/gui/tools.py Normal file
View File

@ -0,0 +1,13 @@
import os
from gi.repository import Gtk
data_dir = os.path.abspath(os.path.dirname(__file__))
class Window(Gtk.Window):
def __init__(self, *args, **kwargs):
Gtk.Window.__init__(self, *args, **kwargs)
self.set_wmclass("ARTIQ GUI", "ARTIQ GUI")
self.set_icon_from_file(os.path.join(data_dir, "icon.png"))
self.set_border_width(6)