Skip to content

Conversation

@pieleric
Copy link
Member

@pieleric pieleric commented Jan 27, 2026

The commit f8f7870 ([fix] update xrc files) changed some of the
sizer flags which turned out to not be useful. On wxPython 4.1 (eg,
Ubuntu 24.04) and later, these flags cause errors, like this:

15:43:12: XRC error: 281: horizontal alignment flag "wxALIGN_RIGHT" has no effect inside a horizontal box sizer, remove it and consider inserting a spacer instead
15:43:12: XRC error: 326: horizontal alignment flag "wxALIGN_RIGHT" has no effect inside a horizontal box sizer, remove it and consider inserting a spacer instead
15:43:12: XRC error: 1013: vertical alignment flag "wxALIGN_CENTER_VERTICAL" has no effect inside a vertical box sizer, remove it and consider inserting a spacer instead

=> Remove these unneeded flags.

The commit f8f7870 ([fix] update xrc files) changed some of the
sizer flags which turned out to not be useful. On wxPython 4.1 (eg,
Ubuntu 24.04) and later, these flags cause errors, like this:
15:43:12: XRC error: 281: horizontal alignment flag "wxALIGN_RIGHT" has no effect inside a horizontal box sizer, remove it and consider inserting a spacer instead
15:43:12: XRC error: 326: horizontal alignment flag "wxALIGN_RIGHT" has no effect inside a horizontal box sizer, remove it and consider inserting a spacer instead
15:43:12: XRC error: 1013: vertical alignment flag "wxALIGN_CENTER_VERTICAL" has no effect inside a vertical box sizer, remove it and consider inserting a spacer instead

=> Remove these unneeded flags.
@coderabbitai
Copy link

coderabbitai bot commented Jan 27, 2026

📝 Walkthrough

Walkthrough

This pull request modifies wxWidgets GUI resource definition files by simplifying alignment style flags in widget declarations. The changes remove or reduce alignment flags such as wxALIGN_RIGHT and wxALIGN_CENTER_VERTICAL from multiple controls in main_xrc.py and panel_tab_fibsem.xrc, typically leaving only positional flags like wxLEFT combined with wxALIGN_CENTER_VERTICAL. No functional logic, control hierarchy, event bindings, or control behavior are altered—only the explicit alignment directives in the resource XML are simplified.

Possibly related PRs

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately reflects the main change: fixing XRC file errors with wxPython 4.1+ by removing ineffective alignment flags.
Description check ✅ Passed The pull request description clearly explains the issue (wxPython 4.1+ errors from unnecessary alignment flags), provides error examples, and describes the fix (removing unneeded flags).

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Removes invalid/unnecessary XRC sizer alignment flags in the FIBSEM tab resources to avoid wxPython 4.1+ XRC load errors (notably on Ubuntu 24.04+).

Changes:

  • Removed wxALIGN_RIGHT from sizer item flags where it has no effect in horizontal box sizers (and triggers wxPython 4.1+ XRC errors).
  • Removed wxALIGN_CENTER_VERTICAL where it has no effect in a vertical box sizer (and triggers wxPython 4.1+ XRC errors).
  • Updated the embedded/generated resource content in main_xrc.py to match the corrected XRC.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/odemis/gui/xmlh/resources/panel_tab_fibsem.xrc Removes the problematic alignment flags in the FIBSEM tab XRC layout to prevent XRC parsing errors.
src/odemis/gui/main_xrc.py Mirrors the same flag removals in the pywxrc-generated embedded resources so runtime loading uses the corrected layout.

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