Commit d419145
Equalize dock zone sizes on startup (#265)
* Fix unit visibility change not propagating to other views
`get_visible_unit_ids()` returned a direct reference to the internal
`_visible_unit_ids` list. Callers that snapshot the list before and after
`set_unit_visibility()` to detect changes were comparing the same mutated
object, so the comparison always found no difference and never triggered
`notify_unit_visibility_changed()`.
Return a copy instead so before/after comparisons work correctly.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Equalize dock zone sizes on startup
Dock widgets created by splitDockWidget() have uneven default sizes.
Add a showEvent hook that calls resizeDocks() with equal weights after
the window is visible, so all zones start proportionally sized.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Use processEvents instead of timer for dock equalization
Replace QTimer.singleShot(100ms) hack with QApplication.processEvents()
to flush pending layout events synchronously before calling resizeDocks.
Deterministic and avoids arbitrary delay.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
* Fix dock equalization not working on macOS
Replace synchronous processEvents() + resizeDocks() with a deferred
QTimer.singleShot(0) call. On macOS, the Cocoa window system performs
a layout pass after Qt's showEvent, overwriting sizes set synchronously.
The deferred call ensures resizeDocks runs after the native layout completes.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 5186578 commit d419145
1 file changed
Lines changed: 17 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
255 | 255 | | |
256 | 256 | | |
257 | 257 | | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
258 | 275 | | |
259 | 276 | | |
260 | 277 | | |
| |||
0 commit comments