From df9e83688638f5cbb6204a82f9c8fc1b6594df19 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Mon, 21 Dec 2020 09:38:48 -0800 Subject: [PATCH] adjust padding in post item --- src/widgets.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/widgets.py b/src/widgets.py index e94e95c..324b6b6 100644 --- a/src/widgets.py +++ b/src/widgets.py @@ -240,9 +240,9 @@ class PostItem(Gtk.ListBoxRow): self.avatar.set_image_load_func(self.get_avatar, post.user.content.avatar_image.link) #self.avatar = Gtk.Image.new_from_pixbuf(self.get_avatar(48, post.user.content.avatar_image.link)) self.source = Gtk.Label(label=post.source.name, xalign=1, yalign=0) - self.h_box.pack_start(self.avatar, False, False, 18) + self.h_box.pack_start(self.avatar, False, False, 10) self.h_box.pack_start(self.name_box, False, False, 0) - self.h_box.pack_end(self.source, False, False, 18) + self.h_box.pack_end(self.source, False, False, 10) # content container self.c_box = Gtk.Box(orientation='vertical') @@ -251,8 +251,8 @@ class PostItem(Gtk.ListBoxRow): # TODO: parse content links if 'content' in post: self.content.set_markup(post.content.text) - self.t_box.pack_start(self.content, False, False, 18) - self.c_box.pack_start(self.t_box, False, False, 18) + self.t_box.pack_start(self.content, False, False, 10) + self.c_box.pack_start(self.t_box, False, False, 10) if 'raw' in post: for raw in post.raw: @@ -261,31 +261,31 @@ class PostItem(Gtk.ListBoxRow): oembed = raw.value if oembed.type == "photo": photo = Gtk.Image.new_from_pixbuf(self.get_oembed_thumb(oembed)) - self.c_box.pack_end(photo, False, False, 18) + self.c_box.pack_end(photo, False, False, 10) # footer container self.f_box = Gtk.Box(orientation='horizontal') post_date_local = post.created_at.astimezone(tzlocal()) datetime_label = Gtk.Label(label=post_date_local.strftime("%Y-%m-%d %H:%M"), xalign=1) - self.f_box.pack_end(datetime_label, False, False, 18) + self.f_box.pack_end(datetime_label, False, False, 10) pad = Gtk.Label(label="") - self.f_box.pack_start(pad, False, False, 9) + self.f_box.pack_start(pad, False, False, 10) if post.id != int(post.thread_id): thread_icon = Gtk.Image.new_from_icon_name("user-available-symbolic", Gtk.IconSize.SMALL_TOOLBAR) - self.f_box.pack_start(thread_icon, False, False, 9) + self.f_box.pack_start(thread_icon, False, False, 5) if post.counts.bookmarks > 0: if post.you_bookmarked: star_icon = Gtk.Image.new_from_icon_name("starred-symbolic", Gtk.IconSize.SMALL_TOOLBAR) else: star_icon = Gtk.Image.new_from_icon_name("non-starred-symbolic", Gtk.IconSize.SMALL_TOOLBAR) star_count = Gtk.Label(label=post.counts.bookmarks) - self.f_box.pack_start(star_icon, False, False, 9) + self.f_box.pack_start(star_icon, False, False, 5) self.f_box.pack_start(star_count, False, False, 0) if post.counts.reposts > 0: repost_icon = Gtk.Image.new_from_icon_name("media-playlist-repeat-symbolic", Gtk.IconSize.SMALL_TOOLBAR) repost_count = Gtk.Label(label=post.counts.reposts) - self.f_box.pack_start(repost_icon, False, False, 9) + self.f_box.pack_start(repost_icon, False, False, 5) self.f_box.pack_start(repost_count, False, False, 0) self.box.pack_start(self.h_box, True, True, 10)