-
Notifications
You must be signed in to change notification settings - Fork 7
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
Conversation
There was a problem hiding this 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) ✅
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); | ||
} |
There was a problem hiding this comment.
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
// button.setDisabledImage(im); | ||
// button.setEnabled(false); | ||
// } | ||
if (tb.getItemCount() == 0 && PlatformHelper.isWindows() && control != null) { |
There was a problem hiding this comment.
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
@@ -57,58 +57,59 @@ public class GamaToolbar2 extends Composite { | |||
/** The has tooltip. */ | |||
private boolean hasTooltip; | |||
|
|||
/** The height. */ |
There was a problem hiding this comment.
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%
I didn't see any change in buttons, could you explain what it is supposed to fix exactly ? |
It is supposed to fix the annoying size of the experiment buttons in editors. |
No description provided.