Phase 7 tests: bounds-change hook + geometry refresh + debugger label placement
- CanvasState on_bounds_change: programmatic resize, set_prop width, set_bounds/move_to and handle drags fire it; selection changes and unrelated prop edits do not. - Inspector refresh_geometry: programmatic resize updates the width/ height spins in place (same editor widgets, no rebuild) and a spin edit still live-applies; no-op with nothing selected. - DebuggerWindow: Breakpoints label is the first child of its pane (above the list) and sits above the tree in window coordinates; Output label has a 6px top margin.
This commit is contained in:
1 parent
6eabe93b65
commit
c8263b2035
3 files changed
+112
No files matched your search
@@ -352,6 +352,32 @@ class DebuggerWindowTests(unittest.TestCase):
|
||||
for col in self.win.bp_tree.get_columns()]
|
||||
self.assertIn(BP_LOCATION_MIN_WIDTH, widths)
|
||||
|
||||
def test_breakpoint_label_is_above_list(self):
|
||||
# Phase 7 fix A: "Breakpoints" sits above its list (like
|
||||
# "Locals"), not below it crowding the "Output" label.
|
||||
# Packing order in the pane box is the structural check;
|
||||
# window-relative y (via translate_coordinates, since
|
||||
# allocations are parent-relative) is the visual check.
|
||||
pane = self.win.bp_label.get_parent()
|
||||
children = pane.get_children()
|
||||
self.assertIs(children[0], self.win.bp_label)
|
||||
self.assertIn(self.win.bp_tree.get_parent(), children)
|
||||
self.assertLess(
|
||||
children.index(self.win.bp_label),
|
||||
children.index(self.win.bp_tree.get_parent()))
|
||||
self.win.show()
|
||||
while Gtk.events_pending():
|
||||
Gtk.main_iteration()
|
||||
window = self.win.window
|
||||
bp_y = self.win.bp_label.translate_coordinates(window, 0, 0)[1]
|
||||
tree_y = self.win.bp_tree.translate_coordinates(window, 0, 0)[1]
|
||||
out_y = self.win.output_label.translate_coordinates(
|
||||
window, 0, 0)[1]
|
||||
self.assertLess(bp_y, tree_y)
|
||||
self.assertGreater(out_y, tree_y)
|
||||
self.assertGreaterEqual(
|
||||
self.win.output_label.get_margin_top(), 6)
|
||||
|
||||
def test_watch_and_locals_trees_have_no_search(self):
|
||||
# Bug 7: clicking a watch/locals row must not open a search
|
||||
# popup — search is disabled on both trees.
|
||||
|
||||
Reference in new issue
Block a user