fix: button colors + invisible cursor#352
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
| b = Math.min(255, Math.max(0, (int)(b * factor))); | ||
|
|
||
| return String.format("#%02x%02x%02x", r, g, b); | ||
| } catch (Exception e) { |
Check warning
Code scanning / PMD
Avoid catching Exception in try-catch block
48d770c to
e498986
Compare
e498986 to
3cc4844
Compare
| container.setLayout(new FillLayout()); | ||
|
|
||
| browser = new Browser(container, SWT.NONE); | ||
| browser = new Browser(container, SWT.WEBKIT); |
There was a problem hiding this comment.
I am not knowledgeable in this area, so cannot review, please ask @acke.
There was a problem hiding this comment.
@nick-y-snyk Did you run the new setttings on Eclipse in Windows?
If you run into problems when you do, you might want to use EDGE in Windows. SWT.EDGE is used in SnykToolView.java (lines 83, 109) and falls back to SWT.NONE on non-Windows.
WebKit is not recommended on Windows, WebKit support was removed in SWT 4.10+.
Either stick to using EDGE, or add something like this to handle Windows correctly.
int browserStyle;
if (Platform.getOS().equals(Platform.OS_WIN32)) {
browserStyle = SWT.EDGE; // Use Edge WebView2 on Windows
} else {
browserStyle = SWT.WEBKIT; // Use WebKit on macOS/Linux
}
browser = new Browser(container, browserStyle);
Description
Provide description of this PR and changes, if linked Jira ticket doesn't cover it in full.
Checklist
Screenshots / GIFs
Visuals that may help the reviewer. Please add screenshots for any UI change. GIFs are most welcome!