Skip to content
This repository was archived by the owner on Mar 31, 2020. It is now read-only.

Commit cdf034e

Browse files
committed
Widget spacing fixed (sort of)
1 parent 5d26844 commit cdf034e

File tree

3 files changed

+13
-20
lines changed

3 files changed

+13
-20
lines changed

src/front.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,21 @@ def init(self):
6262
self.btn_like = widget.PrimaryButton(
6363
self.commandbar, text='Yep', bg='green', command=self.cmd_like
6464
)
65-
self.title.pack(fill='x')
66-
self.window.pack(fill='both')
67-
self.commandbar.pack(side='bottom', fill='x')
65+
self.title.pack(fill='x', expand=True)
66+
self.window.pack(fill='both', expand=True)
67+
self.commandbar.pack(side='bottom', fill='x', expand=True)
6868

69-
self.btn_bio.pack()
7069
self.btn_dislike.pack(side='left')
71-
self.btn_like.pack(side='right')
70+
self.btn_bio.pack(side='left')
71+
self.btn_like.pack(side='left')
7272

7373
self.cache = ImageCache(self.cachesize)
7474

7575
def cmd_dislike(self):
76-
self.__change_image('right')
76+
self.__change_image('left')
7777

7878
def cmd_like(self):
79-
self.__change_image('left')
79+
self.__change_image('right')
8080

8181
def cmd_bio(self):
8282
if self.window.current != self.bio:

src/main.py

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from pygame import mixer
44

55
from .front import Front
6-
from .view import Window, View
76
from . import SETTINGS
87

98

@@ -24,14 +23,6 @@ def __init__(self, *args, **kwds):
2423
self.minsize(400, 500)
2524
self.maxsize(400, 500)
2625

27-
self.window = Window(self)
28-
self.front = View(
29-
Front(
30-
self.window,
31-
width=self.window.winfo_width(),
32-
height=self.window.winfo_height()
33-
),
34-
'widget'
35-
)
36-
self.window.pack(fill='both', expand=True)
37-
self.window.set_view(self.front)
26+
self.front = Front(self)
27+
28+
self.front.pack(fill='both', expand=True)

src/widget.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ def __init__(self, *args, **kwds):
5353

5454

5555
class PrimaryFrame(tk.Frame):
56-
DEFAULT = {}
56+
DEFAULT = {
57+
'bg': 'black'
58+
}
5759

5860
def __init__(self, *args, **kwds):
5961
self.DEFAULT.update(kwds)

0 commit comments

Comments
 (0)