Debugging

This commit is contained in:
Profitroll 2023-01-26 11:11:04 +01:00
parent 557ee221d5
commit 4fa2a3ad9a
2 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,4 @@
from tkinter import NSEW, Canvas, Event, ttk from tkinter import E, N, NSEW, S, Canvas, Event, ttk
from classes.custom.themed_frame import ThemedFrame from classes.custom.themed_frame import ThemedFrame
@ -33,6 +33,8 @@ class ScrollableFrame(ThemedFrame):
self.scroll_speed = scroll_speed self.scroll_speed = scroll_speed
self.master_frame = ThemedFrame(master) self.master_frame = ThemedFrame(master)
# self.master_frame["borderwidth"] = 1
# self.master_frame["relief"] = "solid"
self.master_frame.grid_rowconfigure(0, weight=1) self.master_frame.grid_rowconfigure(0, weight=1)
self.master_frame.grid_columnconfigure(0, weight=1) self.master_frame.grid_columnconfigure(0, weight=1)
self.dummy_canvas = Canvas(self.master_frame, highlightthickness=0, **kwargs) self.dummy_canvas = Canvas(self.master_frame, highlightthickness=0, **kwargs)
@ -41,7 +43,7 @@ class ScrollableFrame(ThemedFrame):
# Create the 2 scrollbars # Create the 2 scrollbars
if vscroll: if vscroll:
self.v_scrollbar = ttk.Scrollbar(self.master_frame, orient="vertical", command=self.dummy_canvas.yview, **scrollbar_kwargs) self.v_scrollbar = ttk.Scrollbar(self.master_frame, orient="vertical", command=self.dummy_canvas.yview, **scrollbar_kwargs)
self.v_scrollbar.grid(row=0, column=1, sticky=NSEW) self.v_scrollbar.grid(row=0, column=1, sticky=N+S+E)
self.dummy_canvas.configure(yscrollcommand=self.v_scrollbar.set) self.dummy_canvas.configure(yscrollcommand=self.v_scrollbar.set)
if hscroll: if hscroll:
self.h_scrollbar = ttk.Scrollbar(self.master_frame, orient="horizontal", command=self.dummy_canvas.xview, **scrollbar_kwargs) self.h_scrollbar = ttk.Scrollbar(self.master_frame, orient="horizontal", command=self.dummy_canvas.xview, **scrollbar_kwargs)

View File

@ -1,5 +1,5 @@
from os import path, walk from os import path, walk
from tkinter import NSEW, ttk from tkinter import E, NSEW, W, ttk
import xmltodict import xmltodict
from ttkthemes import ThemedTk from ttkthemes import ThemedTk
@ -21,6 +21,9 @@ class FrameSaves(ScrollableFrame):
self.saves = saves self.saves = saves
self.saves_local = [] self.saves_local = []
# self["borderwidth"] = 1
# self["relief"] = "solid"
for subdir, dirs, files in walk(configGet("saves_location")): for subdir, dirs, files in walk(configGet("saves_location")):
try: try:
for dir in dirs: for dir in dirs:
@ -66,7 +69,7 @@ class FrameSaves(ScrollableFrame):
for save in self.saves: for save in self.saves:
save_frame = FrameSave(self, save_dict=save) save_frame = FrameSave(self, save_dict=save)
save_frame.grid(column=0, row=i, pady=9, padx=9, sticky=NSEW) save_frame.grid(column=0, row=i, pady=9, padx=9, sticky=W+E)
i += 1 i += 1