Skip to content

fix: Inherit parent background for preference controls to ensure consistent UI appearance#22

Merged
ajaykontham merged 1 commit into
dev/anypoint-studiofrom
feat/copilot-ui-fix
May 21, 2026
Merged

fix: Inherit parent background for preference controls to ensure consistent UI appearance#22
ajaykontham merged 1 commit into
dev/anypoint-studiofrom
feat/copilot-ui-fix

Conversation

@ajaykontham

Copy link
Copy Markdown
Member

No description provided.

Copilot AI review requested due to automatic review settings May 21, 2026 14:14

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR improves preference page UI consistency by ensuring certain layout-oriented controls inherit their parent composite’s background, reducing visual mismatches across themes and platform renderers.

Changes:

  • Added PreferencePageUtils.inheritParentBackground(Control) to apply parent backgrounds (recursively for composites).
  • Updated WrappableNoteLabel and WrappableIconLink to apply background inheritance on creation and on parent resize.
  • Updated MuleSoftMcpPreferencePage to explicitly set container/control backgrounds to match the parent.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/WrappableNoteLabel.java Re-applies parent background (via utility) during creation and resize handling.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/WrappableIconLink.java Re-applies parent background (via utility) during creation and resize handling.
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/preferences/PreferencePageUtils.java Introduces shared background inheritance helper and uses it for created preference links.
com.microsoft.copilot.eclipse.anypoint/src/com/microsoft/copilot/eclipse/anypoint/MuleSoftMcpPreferencePage.java Aligns preference page control backgrounds with parent; adds a local helper for this.

Comment on lines 106 to +110
private void setupResizeListener() {
parentToWatch.addControlListener(ControlListener.controlResizedAdapter(e -> updateContentLabelWidth()));
parentToWatch.addControlListener(ControlListener.controlResizedAdapter(e -> {
PreferencePageUtils.inheritParentBackground(this);
updateContentLabelWidth();
}));
Comment on lines 147 to +151
private void setupResizeListener() {
parent.addControlListener(ControlListener.controlResizedAdapter(e -> updateLinkWidth()));
parent.addControlListener(ControlListener.controlResizedAdapter(e -> {
PreferencePageUtils.inheritParentBackground(this);
updateLinkWidth();
}));
Comment on lines +105 to +110
private static void useParentBackground(Control control) {
if (control != null && !control.isDisposed() && control.getParent() != null
&& !control.getParent().isDisposed()) {
control.setBackground(control.getParent().getBackground());
}
}
@ajaykontham ajaykontham merged commit 724a4aa into dev/anypoint-studio May 21, 2026
1 check passed
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.

2 participants