-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__widget__.py
38 lines (30 loc) · 1.07 KB
/
__widget__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# coding: utf-8
"""
Example widget template.
"""
from aspinwall_launcher.widgets import Widget
from gi.repository import Gtk
translatable = lambda message: message
class MyWidget(Widget):
metadata = {
"id": "com.github.aspinwall_ui.example",
"version": '0.1.0',
"name": translatable("Example widget"),
"author": "Your name here",
"icon": "preferences-system-symbolic",
"description": translatable("Widget template used as a base for development"),
"tags": translatable("tag1,tag2,tag3"),
# Optional metadata
"url": "https://github.com/CHANGEME/CHANGEME",
"issue_tracker": "https://github.com/CHANGEME/CHANGEME/issues"
}
def __init__(self, instance=0):
super().__init__(instance)
_ = self.l
self.content = Gtk.Box(hexpand=True, orientation=Gtk.Orientation.VERTICAL)
example_label = Gtk.Label(
label=_('Replace me with the widget content!')
)
self.content.append(example_label)
self.set_child(self.content)
_widget_class = MyWidget