changeset 190:dfdbc75cd45f

use floating point font size, change size by scaling factor rather than linear addition
author Carl Byington <carl@five-ten-sg.com>
date Wed, 02 Jul 2014 16:23:21 -0700
parents ab6f64d1a24a
children 2e4ab8c33851
files src/com/five_ten_sg/connectbot/service/TerminalBridge.java src/com/five_ten_sg/connectbot/util/HostDatabase.java
diffstat 2 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/com/five_ten_sg/connectbot/service/TerminalBridge.java	Wed Jul 02 16:14:57 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/service/TerminalBridge.java	Wed Jul 02 16:23:21 2014 -0700
@@ -172,7 +172,6 @@
      * Create new terminal bridge with following parameters.
      */
     public TerminalBridge(final TerminalManager manager, final HostBean host, final String homeDirectory) throws IOException {
-        float hostFontSize;
         this.manager       = manager;
         this.host          = host;
         this.homeDirectory = homeDirectory;
--- a/src/com/five_ten_sg/connectbot/util/HostDatabase.java	Wed Jul 02 16:14:57 2014 -0700
+++ b/src/com/five_ten_sg/connectbot/util/HostDatabase.java	Wed Jul 02 16:23:21 2014 -0700
@@ -177,7 +177,7 @@
                    + FIELD_HOST_POSTLOGIN + " TEXT, "
                    + FIELD_HOST_PUBKEYID + " INTEGER DEFAULT " + PUBKEYID_ANY + ", "
                    + FIELD_HOST_DELKEY + " TEXT DEFAULT '" + DELKEY_DEL + "', "
-                   + FIELD_HOST_FONTSIZE + " INTEGER, "
+                   + FIELD_HOST_FONTSIZE + " REAL, "
                    + FIELD_HOST_WANTSESSION + " TEXT DEFAULT '" + Boolean.toString(true) + "', "
                    + FIELD_HOST_COMPRESSION + " TEXT DEFAULT '" + Boolean.toString(false) + "', "
                    + FIELD_HOST_HTTPPROXY + " TEXT, "
@@ -280,7 +280,7 @@
 
             case 20:
                 db.execSQL("ALTER TABLE " + TABLE_HOSTS
-                           + " ADD COLUMN " + FIELD_HOST_FONTSIZE + " INTEGER");
+                           + " ADD COLUMN " + FIELD_HOST_FONTSIZE + " REAL");
 
             case 21:
                 db.execSQL("DROP TABLE " + TABLE_COLOR_DEFAULTS);
@@ -452,7 +452,7 @@
             host.setPubkeyId(c.getLong(COL_PUBKEYID));
             host.setWantSession(Boolean.valueOf(c.getString(COL_WANTSESSION)));
             host.setDelKey(c.getString(COL_DELKEY));
-            host.setFontSize(c.getInt(COL_FONTSIZE));
+            host.setFontSize(c.getFloat(COL_FONTSIZE));
             host.setCompression(Boolean.valueOf(c.getString(COL_COMPRESSION)));
             host.setHttpproxy(c.getString(COL_HTTPPROXY));
             host.setEncoding(c.getString(COL_ENCODING));