mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8337457: Redundant Math.round call in AquaProgressBarUI#getStringPlacement
Reviewed-by: azvegint
This commit is contained in:
parent
8af2ef35b6
commit
65646b5f81
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
@ -256,7 +256,7 @@ public class AquaProgressBarUI extends ProgressBarUI implements ChangeListener,
|
|||
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() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue