From cdaa7e2c23e01f511c278b0ae20f3a1e02d2fb72 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Sun, 5 Jun 2016 23:48:58 +0200 Subject: [PATCH] (int)Math.ceil(i / 2) is equivalent to i / 2 --- .../openapi/actionSystem/impl/IdeaActionButtonLook.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/IdeaActionButtonLook.java b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/IdeaActionButtonLook.java index 4f4b679ba788..22b0d52be230 100644 --- a/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/IdeaActionButtonLook.java +++ b/platform/platform-impl/src/com/intellij/openapi/actionSystem/impl/IdeaActionButtonLook.java @@ -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); }