aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Stack <bgstack15@gmail.com>2024-05-02 15:48:57 -0400
committerB. Stack <bgstack15@gmail.com>2024-05-02 15:48:57 -0400
commitc0d497085868025577871de1320552aea9fb2e2e (patch)
treef0264a1d23f3cf8e561a20ae007845054e9d1fb8
parenttk: improve bg colors for labels in levelset area (diff)
downloadsrb_lib-master.tar.gz
srb_lib-master.tar.bz2
srb_lib-master.zip
tk: rearrange balloons for narrower windowHEADmaster
-rwxr-xr-xsrb_tk.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/srb_tk.py b/srb_tk.py
index b8ace4d..0760230 100755
--- a/srb_tk.py
+++ b/srb_tk.py
@@ -306,18 +306,18 @@ class App(tk.Frame):
if "c" in tl and tl["c"] != "none":
tl_bg = "#" + hex(colors[tl["c"]])[2:]
tk.Label(self.frm_levels,background=tl_bg).grid(row=x,column=0,rowspan=tl["l"],columnspan=17,sticky="NESW")
- tk.Label(self.frm_levels,image=self.img_balloons[-1],background=tl_bg).grid(row=x,column=2,columnspan=2)
+ tk.Label(self.frm_levels,image=self.img_balloons[-1],background=tl_bg).grid(row=x+2,column=0,columnspan=1)
#self.lbl_levelsets.append(tk.Label(self.frm_levels,text=tl["name"],image=self.img_balloons[-1],compound="right"))
self.lbl_levelsets.append(tk.Label(self.frm_levels,text=tl["name"],background=tl_bg))
- self.lbl_levelsets[i].grid(row=x,column=0,sticky="EW",columnspan=2)
+ self.lbl_levelsets[i].grid(row=x,column=0,sticky="EW",columnspan=3)
self.spn_levelsets.append(stk.Spinbox(self.frm_levels,textvariable=self.levelset_status_ints[i],from_=0,to=tl["l"],width=2))
- self.spn_levelsets[i].grid(row=x+1,column=0)
- tk.Label(self.frm_levels,text="/ " + str(tl["l"]),justify="left",background=tl_bg).grid(row=x+1,column=1)
+ self.spn_levelsets[i].grid(row=x+1,column=1)
+ tk.Label(self.frm_levels,text="/ " + str(tl["l"]),justify="left",background=tl_bg).grid(row=x+1,column=2,sticky="W")
# balloons per levelset
if "c" in tl and tl["c"] != "none":
self.ent_levelsets_balloons.append(tk.Entry(self.frm_levels,textvariable=self.levelset_balloons_ints[i],state="readonly",width=3))
- self.ent_levelsets_balloons[-1].grid(row=x+1,column=2)
- tk.Label(self.frm_levels,text="/" + str(tl["b"]),background=tl_bg).grid(row=x+1,column=3,sticky="E")
+ self.ent_levelsets_balloons[-1].grid(row=x+2,column=1)
+ tk.Label(self.frm_levels,text="/" + str(tl["b"]),justify="left",background=tl_bg).grid(row=x+2,column=2,sticky="W")
#print(f"For levelset {tl},")
these_levels = [k for k in srb_lib.LEVELS if k["setid"] == tl["id"]]
sorted(these_levels,key=lambda i: i["id"])
bgstack15