Skip to content

Commit

Permalink
8337457: Redundant Math.round call in AquaProgressBarUI#getStringPlac…
Browse files Browse the repository at this point in the history
…ement

Reviewed-by: azvegint
  • Loading branch information
prsadhuk committed Aug 1, 2024
1 parent 8af2ef3 commit 65646b5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -256,7 +256,7 @@ protected Point getStringPlacement(final Graphics g, final String progressString
y = oldX;
}

return new Point(x + Math.round(width / 2 - stringWidth / 2), y + ((height + fontSizer.getAscent() - fontSizer.getLeading() - fontSizer.getDescent()) / 2) - 1);
return new Point(x + (width / 2 - stringWidth / 2), y + ((height + fontSizer.getAscent() - fontSizer.getLeading() - fontSizer.getDescent()) / 2) - 1);
}

static Dimension getCircularPreferredSize() {
Expand Down

0 comments on commit 65646b5

Please sign in to comment.