From 03b3bf23401c480602162c0e3f45626e5d9f2e0e Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Tue, 31 May 2011 18:25:45 +0200 Subject: Limit font size on redeal button etc. git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@353 72836036-5685-4462-b002-a69064685172 --- src/jrummikub/view/impl/PlayerPanel.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/jrummikub/view/impl') diff --git a/src/jrummikub/view/impl/PlayerPanel.java b/src/jrummikub/view/impl/PlayerPanel.java index e07da5f..a16b32f 100644 --- a/src/jrummikub/view/impl/PlayerPanel.java +++ b/src/jrummikub/view/impl/PlayerPanel.java @@ -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( @@ -395,7 +399,7 @@ class PlayerPanel extends JPanel implements IPlayerPanel { if (!enable) { setEndTurnMode(false, false); endTurnButton.setText("
Computer denkt nach"); - hand.setStones(Collections.>emptyList()); + hand.setStones(Collections.> emptyList()); handRowDownButton.setForeground(Color.GRAY); handRowDownButton.setEnabled(false); handRowUpButton.setForeground(Color.GRAY); -- cgit v1.2.3