Limit font size on redeal button etc.
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@353 72836036-5685-4462-b002-a69064685172
This commit is contained in:
parent
ca0696d40c
commit
03b3bf2340
1 changed files with 6 additions and 2 deletions
|
@ -330,8 +330,12 @@ class PlayerPanel extends JPanel implements IPlayerPanel {
|
|||
int buttonHeight = height - SIDE_PANEL_SEPARATOR - firstLineHeight;
|
||||
float fontSize = (float) Math.sqrt(buttonWidth * buttonHeight) / 5;
|
||||
float smallFontSize = (float) Math.sqrt(smallButtonWidth * buttonHeight) / 5;
|
||||
if (fontSize > MAX_BUTTON_FONT_SIZE)
|
||||
if (fontSize > MAX_BUTTON_FONT_SIZE) {
|
||||
fontSize = MAX_BUTTON_FONT_SIZE;
|
||||
}
|
||||
if (smallFontSize > MAX_BUTTON_FONT_SIZE) {
|
||||
smallFontSize = MAX_BUTTON_FONT_SIZE;
|
||||
}
|
||||
|
||||
handRowUpButton.setBounds(0, 0, handButtonWidth, getHeight() / 2);
|
||||
handRowUpButton.setFont(handRowUpButton.getFont().deriveFont(
|
||||
|
|
Reference in a new issue