Skip to content

Uniform padding#1202

Draft
AdvancedImagingUTSW wants to merge 2 commits intodevelopfrom
uniform-padding
Draft

Uniform padding#1202
AdvancedImagingUTSW wants to merge 2 commits intodevelopfrom
uniform-padding

Conversation

@AdvancedImagingUTSW
Copy link
Collaborator

No description provided.

Introduce themed_grid and configure_grid utilities (and spacing resolution helpers) to centralize spacing, padding and grid configuration using theme tokens. Replace many direct .grid/.grid_rowconfigure calls across the main window, tabs and panels with themed_grid/configure_grid to enforce consistent layout and spacing. Extend theme presets with layout and padding tokens (layout_window/panel/section/control gaps, canvas/sidebar sizes, panel/card paddings) and adjust notebook tab styling/padding.

Make camera/display sizing and resize handling more robust: add _get_canvas_widget_size helper, allow update_canvas_size to accept optional width/height, reduce refresh debounce and tighten size-change thresholds, bind resize handler to the canvas and track binding IDs, and add extra defensive checks to avoid tiny/invalid sizes. Minor controller change: call update_idletasks during main resize to ensure measurements are stable.
Replace direct grid calls with themed_grid and configure_grid across multiple UI modules to centralize layout behavior and support theme spacing tokens. Add get_theme_spacing usage and a helper _resolve_pad_value to allow padding to be specified as theme tokens or raw numbers, and update LabelInput.pad_input to resolve tokens. Fix PhotoImage master usage and adjust various grid/padding calls to use theme spacing identifiers. Update and extend tests: adapt LabelInput tests and add test_main_ui_layout to assert weighted layout configuration.
@codecov
Copy link

codecov bot commented Mar 6, 2026

Codecov Report

❌ Patch coverage is 97.11191% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 55.61%. Comparing base (4a54bc7) to head (fe7c7e6).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
src/navigate/view/main_window_content/stage_tab.py 87.50% 4 Missing ⚠️
src/navigate/view/custom_widgets/common.py 94.54% 3 Missing ⚠️
src/navigate/view/theme.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1202      +/-   ##
===========================================
+ Coverage    55.51%   55.61%   +0.09%     
===========================================
  Files          189      189              
  Lines        24977    25049      +72     
===========================================
+ Hits         13866    13931      +65     
- Misses       11111    11118       +7     
Flag Coverage Δ
unittests 55.61% <97.11%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant