Skip to content

Commit b1b2416

Browse files
committed
change display of files with frame
1 parent 6a12aa5 commit b1b2416

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

assetsBrowser.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,8 +185,6 @@ def Init(self, folder=False):
185185

186186
self.label_init()
187187

188-
self.file.display_files()
189-
190188
def label_init(self):
191189
"""
192190
Init Labet

file.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,12 @@ def display_files(self):
5555
Display the files in a Tkinter Treeview within a new Toplevel window.
5656
"""
5757

58-
self.root = tk.Toplevel(self.sdk.root)
59-
self.root.title("Contents")
60-
self.root.geometry("1250x800")
58+
self.main_root = tk.Toplevel(self.sdk.root)
59+
self.main_root.title("File Explorer")
60+
self.main_root.geometry("1400x600")
61+
62+
self.root = tk.Frame(self.main_root, width=200, height=600)
63+
self.root.grid(row=0, column=0, padx=0, pady=0, sticky="nsew")
6164

6265
# Search Label and Entry
6366
search_frame = tk.Frame(self.root)
@@ -105,7 +108,12 @@ def display_files(self):
105108

106109
self.tree.bind("<Double-Button-1>", self.open_file)
107110

108-
self.fileList = FileListApp(self.sdk, self.root)
111+
self.fileList = FileListApp(self.sdk, self.main_root)
112+
113+
# Set the minimum size of the cells in the grid to fit the frames
114+
self.main_root.grid_rowconfigure(0, weight=1)
115+
self.main_root.grid_columnconfigure(0, weight=1)
116+
self.main_root.grid_columnconfigure(1, weight=4)
109117

110118
def open_file(self, event):
111119
"""

fileListApp.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ def __init__(self, sourceSDK, root):
99
"""
1010
"""
1111
self.sdk = sourceSDK
12-
self.root = root
12+
self.root = tk.Frame(root, width=1000, height=600)
13+
self.root.grid(row=0, column=1, padx=0, pady=0, sticky="nsew")
14+
1315
self.current_folder = self.sdk.selected_folder
1416
self.first_folder = self.sdk.selected_folder
1517
self.thumbnails = {}
@@ -159,7 +161,7 @@ def go_up(self):
159161
"""
160162
"""
161163
parent_dir = os.path.dirname(self.current_folder)
162-
if parent_dir and self.current_folder != self.first_folder:
164+
if parent_dir:
163165
self.load_files(parent_dir)
164166

165167
def open_directory(self):

0 commit comments

Comments
 (0)