Mercurial > 510Connectbot
changeset 248:0181323d0d33
add host preference for fixed screen size
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Mon, 14 Jul 2014 11:20:42 -0700 |
parents | 1e1bb5468ebe |
children | dc6e53600ae2 |
files | src/com/five_ten_sg/connectbot/service/TerminalBridge.java |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/service/TerminalBridge.java Mon Jul 14 11:18:24 2014 -0700 +++ b/src/com/five_ten_sg/connectbot/service/TerminalBridge.java Mon Jul 14 11:20:42 2014 -0700 @@ -123,6 +123,7 @@ public int charWidth = -1; public int charHeight = -1; private int charTop = -1; + private float fontSize = -1; private final List<FontSizeChangedListener> fontSizeChangedListeners; @@ -446,6 +447,7 @@ 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);