Mercurial > 510Connectbot
diff src/com/five_ten_sg/connectbot/service/TerminalBridge.java @ 247:1e1bb5468ebe
add host preference for fixed screen size
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 14 Jul 2014 11:18:24 -0700 |
parents | dfe5f44bbea1 |
children | 0181323d0d33 |
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/service/TerminalBridge.java Mon Jul 14 11:16:07 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/service/TerminalBridge.java Mon Jul 14 11:18:24 2014 -0700 @@ -123,7 +123,6 @@ public int charWidth = -1; public int charHeight = -1; private int charTop = -1; - private float fontSize = -1; private final List<FontSizeChangedListener> fontSizeChangedListeners; @@ -447,7 +446,6 @@ if (size <= 0.0) size = 12.0f; size = (float)(int)((size * 10.0f) + 0.5f) / 10.0f; defaultPaint.setTextSize(size); - fontSize = size; // read new metrics to get exact pixel dimensions FontMetrics fm = defaultPaint.getFontMetrics(); charTop = (int)FloatMath.ceil(fm.top); @@ -462,7 +460,7 @@ for (FontSizeChangedListener ofscl : fontSizeChangedListeners) ofscl.onFontSizeChanged(size); - host.setFontSize(fontSize); + host.setFontSize(size); manager.hostdb.updateFontSize(host); }