raster pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=4f75b58d6a26b80c8fad05a02b361746a6cda672

commit 4f75b58d6a26b80c8fad05a02b361746a6cda672
Author: Carsten Haitzler (Rasterman) <[email protected]>
Date:   Fri Dec 6 09:55:50 2019 +0000

    cmdbox - allow multiple + or -'s for font command to go up or down more
    
    so f+++ will increase font size 3 times in a row within a single
    command, as will f--- do the reverse etc. ... use as many +'s and -'s
    and needed.
---
 src/bin/termcmd.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/bin/termcmd.c b/src/bin/termcmd.c
index 5e81283..e038bfc 100644
--- a/src/bin/termcmd.c
+++ b/src/bin/termcmd.c
@@ -61,11 +61,23 @@ _termcmd_font_size(Evas_Object *obj,
           }
         else if (cmd[0] == '+') // size up
           {
-             new_size = ((double)config->font.size * 1.4) + 1;
+             int i;
+
+             new_size = config->font.size;
+             for (i = 0; cmd[i] == '+'; i++)
+               {
+                  new_size = ((double)new_size * 1.4) + 1;
+               }
           }
         else if (cmd[0] == '-') // size down
           {
-             new_size = (double)(config->font.size - 1) / 1.4;
+             int i;
+
+             new_size = config->font.size;
+             for (i = 0; cmd[i] == '-'; i++)
+               {
+                  new_size = (double)(new_size - 1) / 1.4;
+               }
           }
         else
           {

-- 


Reply via email to