mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-21 20:30:39 +00:00
8337457: Redundant Math.round call in AquaProgressBarUI#getStringPlacement
Reviewed-by: azvegint
This commit is contained in:
parent
8af2ef35b6
commit
65646b5f81
@ -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…
x
Reference in New Issue
Block a user