Skip to content

Commit eab674a

Browse files
committed
fix: Few layout fixes
1 parent 3b706ac commit eab674a

2 files changed

Lines changed: 28 additions & 18 deletions

File tree

sandbox/sample_script_to_load.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,5 @@
1919

2020

2121

22+
23+

sandbox/sandbox.py

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,16 @@
2424
ProcessEvent,
2525
ModuleEvent
2626
)
27-
from dap.structs import JSON
27+
2828
from dap_io import IO
2929

3030

3131
class DAPEditor:
32-
"""Main editor class with fixed DAP debugging support."""
32+
"""Main editor class with DAP debugging support."""
3333

3434
def __init__(self):
3535
self.root = tk.Tk()
36-
self.root.title("DAP Text Editor - Fixed Version")
36+
self.root.title("DAP Text Editor")
3737
self.root.geometry("1400x900")
3838

3939
# Editor state
@@ -52,6 +52,12 @@ def __init__(self):
5252
self.event_queue = queue.Queue()
5353

5454
self.create_menu()
55+
56+
# Apply an "old" look theme
57+
style = ttk.Style()
58+
if 'clam' in style.theme_names():
59+
style.theme_use('clam')
60+
5561
self.create_toolbar()
5662
self.create_main_panel()
5763
self.create_status_bar()
@@ -171,21 +177,23 @@ def create_main_panel(self):
171177
self.debug_notebook = ttk.Notebook(right_frame)
172178
self.debug_notebook.pack(fill=tk.BOTH, expand=True)
173179

174-
# Variables tab
175-
self.create_variables_tab()
180+
# Debug tab (Variables, Call Stack, Breakpoints)
181+
debug_tab = ttk.Frame(self.debug_notebook)
182+
self.debug_notebook.add(debug_tab, text="Debug")
176183

177-
# Call Stack tab
178-
self.create_call_stack_tab()
184+
self.debug_paned = ttk.PanedWindow(debug_tab, orient=tk.VERTICAL)
185+
self.debug_paned.pack(fill=tk.BOTH, expand=True)
179186

180-
# Breakpoints tab
181-
self.create_breakpoints_tab()
187+
self.create_variables_panel()
188+
self.create_call_stack_panel()
189+
self.create_breakpoints_panel()
182190

183191
# Output tab
184192
self.create_output_tab()
185193

186-
def create_variables_tab(self):
187-
variables_frame = ttk.Frame(self.debug_notebook)
188-
self.debug_notebook.add(variables_frame, text="Variables")
194+
def create_variables_panel(self):
195+
variables_frame = ttk.LabelFrame(self.debug_paned, text="Variables")
196+
self.debug_paned.add(variables_frame, weight=1)
189197

190198
# Variables tree
191199
self.variables_tree = ttk.Treeview(variables_frame, columns=('value', 'type'), show='tree headings')
@@ -204,9 +212,9 @@ def create_variables_tab(self):
204212
self.variables_tree.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
205213
variables_scroll.pack(side=tk.RIGHT, fill=tk.Y)
206214

207-
def create_call_stack_tab(self):
208-
stack_frame = ttk.Frame(self.debug_notebook)
209-
self.debug_notebook.add(stack_frame, text="Call Stack")
215+
def create_call_stack_panel(self):
216+
stack_frame = ttk.LabelFrame(self.debug_paned, text="Call Stack")
217+
self.debug_paned.add(stack_frame, weight=1)
210218

211219
# Call stack list
212220
self.stack_listbox = tk.Listbox(stack_frame)
@@ -216,9 +224,9 @@ def create_call_stack_tab(self):
216224
self.stack_listbox.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
217225
stack_scroll.pack(side=tk.RIGHT, fill=tk.Y)
218226

219-
def create_breakpoints_tab(self):
220-
breakpoints_frame = ttk.Frame(self.debug_notebook)
221-
self.debug_notebook.add(breakpoints_frame, text="Breakpoints")
227+
def create_breakpoints_panel(self):
228+
breakpoints_frame = ttk.LabelFrame(self.debug_paned, text="Breakpoints")
229+
self.debug_paned.add(breakpoints_frame, weight=1)
222230

223231
# Breakpoints tree
224232
self.breakpoints_tree = ttk.Treeview(breakpoints_frame, columns=('line', 'status'), show='tree headings')

0 commit comments

Comments
 (0)