Fix: Misaligned undo icons across all field types #1559

Closed
opened 2026-04-05 18:23:49 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @kisslorand on 11/21/2025


📝 Description

This PR improves the visual alignment of the undo icons (orange circular arrows) next to controls input controls.

What was wrong

The undo icon was slightly misaligned — positioned too close to or unevenly spaced from neighboring elements such as:

  • text input fields,
  • spin boxes,
  • checkboxes,
  • and other control types.

This inconsistency was especially noticeable in dense sections with mixed field types.

What’s changed

  • Adjusted the horizontal position of the undo icon within OG_CustomCtrl::CtrlLine::draw_act_bmps()
    → now offset proportionally to the layout’s em_unit() (via m_h_gap) for consistent spacing.
  • Ensures alignment is uniform regardless of control type or DPI scaling.
  • Both system undo and local undo icons are affected

Why this helps

  • Visual consistency across all parameter rows
  • Better alignment between text and icon elements
  • Cleaner, more balanced look in both light and dark themes

🔍 Before / After

Before on left, After on the right:

Undo Icons


🧪 Tests done

  • Windows 11, 125% and 150% DPI
  • Checked text fields, spinboxes, and checkboxes
  • Verified both “undo” and “undo-to-system” icons
  • Verified no overlap or clipping in dense option groups

💬 Notes

  • The change uses m_h_gap instead of FromDIP() for alignment to ensure spacing scales consistently with font size.
  • No functional or event logic was modified — purely visual adjustment.
*Originally created by @kisslorand on 11/21/2025* --- ### 📝 Description This PR improves the visual alignment of the undo icons (orange circular arrows) next to controls input controls. #### What was wrong The undo icon was slightly misaligned — positioned too close to or unevenly spaced from neighboring elements such as: - text input fields, - spin boxes, - checkboxes, - and other control types. This inconsistency was especially noticeable in dense sections with mixed field types. #### What’s changed - Adjusted the horizontal position of the undo icon within `OG_CustomCtrl::CtrlLine::draw_act_bmps()` → now offset proportionally to the layout’s `em_unit()` (via `m_h_gap`) for consistent spacing. - Ensures alignment is uniform regardless of control type or DPI scaling. - Both *system undo* and *local undo* icons are affected #### Why this helps - Visual consistency across all parameter rows - Better alignment between text and icon elements - Cleaner, more balanced look in both light and dark themes --- ### 🔍 Before / After Before on left, After on the right: ![Undo Icons](https://github.com/user-attachments/assets/faae2ca4-0500-467d-80a6-5e75d1c4b3e7) --- ### 🧪 Tests done - Windows 11, 125% and 150% DPI - Checked text fields, spinboxes, and checkboxes - Verified both “undo” and “undo-to-system” icons - Verified no overlap or clipping in dense option groups --- ### 💬 Notes - The change uses `m_h_gap` instead of `FromDIP()` for alignment to ensure spacing scales consistently with font size. - No functional or event logic was modified — purely visual adjustment.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/OrcaSlicer#1559