mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
(int)Math.ceil(i / 2) is equivalent to i / 2
This commit is contained in:
+3
-3
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
* Copyright 2000-2016 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -128,8 +128,8 @@ public class IdeaActionButtonLook extends ActionButtonLook {
|
||||
public void paintIcon(Graphics g, ActionButtonComponent actionButton, Icon icon) {
|
||||
final int width = icon.getIconWidth();
|
||||
final int height = icon.getIconHeight();
|
||||
final int x = (int)Math.ceil((actionButton.getWidth() - width) / 2);
|
||||
final int y = (int)Math.ceil((actionButton.getHeight() - height) / 2);
|
||||
final int x = (actionButton.getWidth() - width) / 2;
|
||||
final int y = (actionButton.getHeight() - height) / 2;
|
||||
paintIconAt(g, actionButton, icon, x, y);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user