+ this.el.key_pressed.connect( (keyval, keycode, state) => {
+
+ if (keyval == Gdk.Key.Control_L || keyval == Gdk.Key.Control_R) {
+ this.is_control = true;
+ }
+ return false;
+ });
+ }
+
+ // user defined functions
+ }
+
+ public class Xcls_EventControllerScroll63 : Object
+ {
+ public Gtk.EventControllerScroll el;
+ private Editor _this;
+
+
+ // my vars (def)
+ public double distance;
+
+ // ctor
+ public Xcls_EventControllerScroll63(Editor _owner )
+ {
+ _this = _owner;
+ this.el = new Gtk.EventControllerScroll( Gtk.EventControllerScrollFlags.VERTICAL );
+
+ // my vars (dec)
+ this.distance = 0.0f;
+
+ // set gobject values
+
+ //listeners
+ this.el.scroll.connect( (dx, dy) => {
+ if (!_this.keystate.is_control) {
+ return false;
+ }
+ //GLib.debug("scroll %f", dy);
+
+ this.distance += dy;
+ if (this.distance < 1) {
+ BuilderApplication.settings.editor_font_size ++;
+ this.distance = 0;
+ }
+ if (this.distance > -1) {
+ BuilderApplication.settings.editor_font_size --;
+ this.distance = 0;
+ }
+
+ return true;
+ });