Fix #8037 - bug on zoom
[roobuilder] / src / Builder4 / Editor.bjs
index 9d335fd..f52fdfb 100644 (file)
@@ -57,7 +57,7 @@
         " \tBuilderApplication.settings.editor_font_size_updated.connect(",
         " \t\t() => {",
         " \t\t\tBuilderApplication.settings.editor_font_size_inchange = true;",
-        " \t\t\tGLib.debug(\"update range\");",
+        " \t\t//\tGLib.debug(\"update range\");",
         " \t\t \tthis.el.set_value (BuilderApplication.settings.editor_font_size);",
         " \t\t \tBuilderApplication.settings.editor_font_size_inchange = false;",
         " \t\t}",
            "\tif (!_this.keystate.is_control) {",
            "\t\treturn false;",
            "\t}",
-           "\t//GLib.debug(\"scroll %f\",  dy);",
+           "\t //GLib.debug(\"scroll %f\",  dy);",
            "\t",
            "\tthis.distance += dy;",
-           "\tif (this.distance < 1) {",
+           "\t",
+           "\t//GLib.debug(\"scroll %f / %f\",  dy, this.distance);",
+           " ",
+           "\t if (this.distance < -1) {",
+           " ",
            "\t\tBuilderApplication.settings.editor_font_size ++;",
            "\t\tthis.distance = 0;",
            "\t}",
-           "\tif (this.distance > -1) {",
+           "\tif (this.distance > 1) {",
            "\t\tBuilderApplication.settings.editor_font_size --;",
            "\t\tthis.distance = 0;",
            "\t}",
-           "",
+           "\t ",
            "\treturn true;",
            "}",
            ""