diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-05-31 18:25:45 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2011-05-31 18:25:45 +0200 |
commit | 03b3bf23401c480602162c0e3f45626e5d9f2e0e (patch) | |
tree | 1897cdae1e62a15bdaec1f72ec104e4301b9ee91 | |
parent | ca0696d40c42bd1d73c3bbe11924cb48dc07390c (diff) | |
download | JRummikub-03b3bf23401c480602162c0e3f45626e5d9f2e0e.tar JRummikub-03b3bf23401c480602162c0e3f45626e5d9f2e0e.zip |
Limit font size on redeal button etc.
git-svn-id: svn://sunsvr01.isp.uni-luebeck.de/swproj13/trunk@353 72836036-5685-4462-b002-a69064685172
-rw-r--r-- | src/jrummikub/view/impl/PlayerPanel.java | 8 |
1 files changed, 6 insertions, 2 deletions
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("<html><center>Computer denkt nach"); - hand.setStones(Collections.<Pair<Stone,Position>>emptyList()); + hand.setStones(Collections.<Pair<Stone, Position>> emptyList()); handRowDownButton.setForeground(Color.GRAY); handRowDownButton.setEnabled(false); handRowUpButton.setForeground(Color.GRAY); |