Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements some tricks to have correct sizes for the buttons #372

Merged
merged 1 commit into from
Dec 3, 2024

Conversation

AlexisDrogoul
Copy link
Member

No description provided.

Copy link

@codescene-delta-analysis codescene-delta-analysis bot left a comment

Choose a reason for hiding this comment

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

Code Health Quality Gates: FAILED

Change in average Code Health of affected files: -0.09 (8.06 -> 7.97)

  • Declining Code Health: 2 findings(s) 🚩
  • Improving Code Health: 1 findings(s) ✅

View detailed results in CodeScene

Comment on lines +477 to +484
if (tb.getItemCount() == 0 && PlatformHelper.isWindows() && control != null) {
final var icon = GamaIcon.ofSize(2, GamaToolbarFactory.TOOLBAR_HEIGHT);
final var button = new ToolItem(tb, SWT.NONE);
final var im = icon.image();
button.setImage(im);
button.setDisabledImage(im);
button.setEnabled(false);
}

Choose a reason for hiding this comment

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

❌ New issue: Complex Method
create has a cyclomatic complexity of 11, threshold = 9

Suppress

// button.setDisabledImage(im);
// button.setEnabled(false);
// }
if (tb.getItemCount() == 0 && PlatformHelper.isWindows() && control != null) {

Choose a reason for hiding this comment

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

❌ New issue: Complex Conditional
create has 1 complex conditionals with 2 branches, threshold = 2

Suppress

@@ -57,58 +57,59 @@ public class GamaToolbar2 extends Composite {
/** The has tooltip. */
private boolean hasTooltip;

/** The height. */

Choose a reason for hiding this comment

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

✅ Getting better: Primitive Obsession
The ratio of primitive types in function arguments decreases from 62.34% to 61.33%, threshold = 30.0%

@lesquoyb
Copy link
Contributor

lesquoyb commented Dec 2, 2024

I didn't see any change in buttons, could you explain what it is supposed to fix exactly ?

@AlexisDrogoul
Copy link
Member Author

It is supposed to fix the annoying size of the experiment buttons in editors.

@lesquoyb lesquoyb merged commit 47109a7 into 2024-06 Dec 3, 2024
5 of 6 checks 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