Skip to content

Commit

Permalink
The clickable area of the key images does not match with the button s…
Browse files Browse the repository at this point in the history
…ize #458
  • Loading branch information
nroduit committed Aug 17, 2023
1 parent 712d544 commit d5347c8
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import java.awt.geom.Rectangle2D;
import java.util.Objects;
import javax.swing.Icon;
import org.weasis.core.api.gui.util.GuiUtils;

public class ViewButton extends Rectangle2D.Double implements ShowPopup {

Expand All @@ -30,7 +31,11 @@ public ViewButton(ShowPopup popup, Icon icon, String name) {
this.icon = Objects.requireNonNull(icon);
this.name = Objects.requireNonNull(name);
this.position = GridBagConstraints.EAST;
this.setFrame(0, 0, icon.getIconWidth(), icon.getIconHeight());
this.setFrame(
0,
0,
GuiUtils.getScaleLength(icon.getIconWidth()),
GuiUtils.getScaleLength(icon.getIconHeight()));
}

public boolean isVisible() {
Expand Down

0 comments on commit d5347c8

Please sign in to comment.