Skip to content

Commit

Permalink
Cleanup deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
strangelookingnerd committed Jun 25, 2024
1 parent 038d6d8 commit bdfa75d
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
# Pedro Progress Bar Changelog

## [Unreleased]
### Added
- Do not use deprecated `UIUtil.isUnderWin10LookAndFeel()`
- Plugin description cleanup
- Various dependency updates

## [0.0.2]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import com.intellij.ui.JBColor;
import com.intellij.ui.scale.JBUIScale;
import com.intellij.util.ui.JBInsets;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ui.UIUtilities;

import javax.swing.ImageIcon;
Expand Down Expand Up @@ -260,9 +259,9 @@ protected int getBoxLength(int availableLength, int otherDimension) {
}

private Shape getShapedRect(float x, float y, float w, float h, float ar) {
boolean flatEnds = UIUtil.isUnderWin10LookAndFeel() || progressBar.getClientProperty(
"ProgressBar.flatEnds") == Boolean.TRUE;
return flatEnds ? new Rectangle2D.Float(x, y, w, h) : new RoundRectangle2D.Float(x, y, w, h, ar, ar);
return progressBar.getClientProperty("ProgressBar.flatEnds") == Boolean.TRUE
? new Rectangle2D.Float(x, y, w, h)
: new RoundRectangle2D.Float(x, y, w, h, ar, ar);
}

private int getStripeWidth() {
Expand Down
4 changes: 2 additions & 2 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<!-- Plugin Configuration File. Read more: https://plugins.jetbrains.com/docs/intellij/plugin-configuration-file.html -->
<idea-plugin>
<idea-plugin url="https://github.com/strangelookingnerd/pedro-progress-bar-plugin">
<id>com.github.strangelookingnerd.pedro-progress-bar</id>
<name>Pedro Progress Bar</name>
<vendor>strangelookingnerd</vendor>
<vendor url="https://strangelookingnerd.github.io/">strangelookingnerd</vendor>
<category>User Interface</category>

<depends>com.intellij.modules.platform</depends>
Expand Down

0 comments on commit bdfa75d

Please sign in to comment.