feat: 2023.06.30

This commit is contained in:
mdwalters
2023-06-30 21:45:52 -04:00
parent b547141aa1
commit dee0e5757f
4 changed files with 29 additions and 9 deletions

View File

@@ -21,10 +21,17 @@
<url type="bugtracker">https://github.com/mdwalters/lemonade/issues</url> <url type="bugtracker">https://github.com/mdwalters/lemonade/issues</url>
<screenshots> <screenshots>
<screenshot type="default"> <screenshot type="default">
<image type="source">https://i.ibb.co/x2dwZjZ/image.png</image> <image type="source">https://i.ibb.co/8B3ZHww/image.png</image>
</screenshot> </screenshot>
</screenshots> </screenshots>
<releases> <releases>
<release version="2023.06.30" date="2023-06-30">
<description>
<ul>
<li>Yet another redesign!</li>
</ul>
</description>
</release>
<release version="2023.06.29" date="2023-06-29"> <release version="2023.06.29" date="2023-06-29">
<description> <description>
<ul> <ul>

View File

@@ -1,5 +1,5 @@
project('lemonade', project('lemonade',
version: '2023.06.29', version: '2023.06.30',
meson_version: '>= 0.62.0', meson_version: '>= 0.62.0',
default_options: [ 'warning_level=2', 'werror=false', ], default_options: [ 'warning_level=2', 'werror=false', ],
) )

View File

@@ -32,7 +32,7 @@
{ {
"type" : "git", "type" : "git",
"url" : "https://github.com/mdwalters/lemonade.git", "url" : "https://github.com/mdwalters/lemonade.git",
"tag" : "2023.06.29" "tag" : "2023.06.30"
} }
] ]
} }

View File

@@ -45,11 +45,18 @@ class LemonadeWindow(Gtk.ApplicationWindow):
self.sw.set_hexpand(False) self.sw.set_hexpand(False)
self.sw.set_vexpand(True) self.sw.set_vexpand(True)
self.box = Gtk.Box(orientation=Gtk.Orientation.VERTICAL) self.box = Gtk.Box(
orientation=Gtk.Orientation.VERTICAL,
margin_top = 20,
margin_bottom = 20,
margin_start = 20,
margin_end = 20
)
self.sw.set_child(self.box) self.sw.set_child(self.box)
self.set_child(self.sw) self.set_child(self.sw)
self.listbox = Gtk.ListBox.new() self.listbox = Gtk.ListBox.new()
self.listbox.get_style_context().add_class("boxed-list")
self.listbox.props.hexpand = True self.listbox.props.hexpand = True
self.listbox.props.vexpand = True self.listbox.props.vexpand = True
self.listbox.set_selection_mode(Gtk.SelectionMode.NONE) self.listbox.set_selection_mode(Gtk.SelectionMode.NONE)
@@ -61,7 +68,13 @@ class LemonadeWindow(Gtk.ApplicationWindow):
def refresh(self, *args): def refresh(self, *args):
self.list = requests.get("https://lemmy.ml/api/v3/community/list?sort=Hot").json() self.list = requests.get("https://lemmy.ml/api/v3/community/list?sort=Hot").json()
for post in self.list["communities"]: for post in self.list["communities"]:
box = Gtk.Box.new(Gtk.Orientation.HORIZONTAL, 0) box = Gtk.Box(
orientation=Gtk.Orientation.HORIZONTAL,
margin_top = 20,
margin_bottom = 20,
margin_start = 20,
margin_end = 20
)
self.listbox.append(box) self.listbox.append(box)
label = Gtk.Label.new() label = Gtk.Label.new()
@@ -79,10 +92,10 @@ class LemonadeWindow(Gtk.ApplicationWindow):
label.set_halign(Gtk.Align.START) label.set_halign(Gtk.Align.START)
label.set_selectable(False) label.set_selectable(False)
refresh_button = Gtk.Button.new_from_icon_name("network-wireless") # refresh_button = Gtk.Button.new_from_icon_name("network-wireless")
refresh_button.connect("clicked", self.refresh) # refresh_button.connect("clicked", self.refresh)
refresh_button.set_tooltip_text("Refresh") # refresh_button.set_tooltip_text("Refresh")
box.append(refresh_button) # box.append(refresh_button)
box.append(label) box.append(label)
class Lemonade(Adw.Application): class Lemonade(Adw.Application):