Commit 59bacfa9 authored by Kirill Kirichenko's avatar Kirill Kirichenko Committed by Irina.Chernushina
Browse files

IDEA-184760 UI rendering issues in Android designer

(cherry picked from commit 007ea937)
parent a8edecd1
Branches unavailable Tags unavailable
No related merge requests found
Showing with 6 additions and 16 deletions
+6 -16
/*
* 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.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.openapi.actionSystem.impl;
import com.intellij.ide.HelpTooltip;
......@@ -134,7 +120,7 @@ public class ActionButtonWithText extends ActionButton {
public void paintComponent(Graphics g) {
Icon icon = getIcon();
FontMetrics fm = getFontMetrics(getFont());
Rectangle viewRect = new Rectangle(getSize());
Rectangle viewRect = getButtonRect();
JBInsets.removeFrom(viewRect, getInsets());
Rectangle iconRect = new Rectangle();
......@@ -156,6 +142,10 @@ public class ActionButtonWithText extends ActionButton {
textRect.y + fm.getAscent());
}
protected Rectangle getButtonRect() {
return new Rectangle(getSize());
}
@Override
protected void presentationPropertyChanded(PropertyChangeEvent e) {
super.presentationPropertyChanded(e);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment