@@ -47,7 +47,57 @@ public class jorts.SettingsPopover : Gtk.Popover {
4747 setting_grid. column_spacing = 1 ;
4848 setting_grid. row_spacing = 6 ;
4949 setting_grid. orientation = Gtk . Orientation . VERTICAL ;
50-
50+
51+
52+ /*
53+ var zoom_out_button = new Gtk.Button.from_icon_name ("zoom-out-symbolic") {
54+ tooltip_markup = Granite.markup_accel_tooltip (
55+ TerminalWidget.ACCELS_ZOOM_OUT,
56+ _("Zoom out")
57+ )
58+ };
59+ zoom_out_button.clicked.connect (() => terminal.decrease_font_size ());
60+
61+ var zoom_default_button = new Gtk.Button () {
62+ tooltip_markup = Granite.markup_accel_tooltip (
63+ TerminalWidget.ACCELS_ZOOM_DEFAULT,
64+ _("Default zoom level")
65+ )
66+ };
67+ zoom_default_button.clicked.connect (() => terminal.default_font_size ());
68+
69+ var zoom_in_button = new Gtk.Button.from_icon_name ("zoom-in-symbolic") {
70+ tooltip_markup = Granite.markup_accel_tooltip (
71+ TerminalWidget.ACCELS_ZOOM_IN,
72+ _("Zoom in")
73+ )
74+ };
75+ zoom_in_button.clicked.connect (() => terminal.increase_font_size ());
76+
77+ var font_size_box = new Gtk.Box (HORIZONTAL, 0) {
78+ homogeneous = true,
79+ hexpand = true,
80+ margin_start = 12,
81+ margin_end = 12,
82+ margin_bottom = 6
83+ };
84+ font_size_box.add (zoom_out_button);
85+ font_size_box.add (zoom_default_button);
86+ font_size_box.add (zoom_in_button);
87+
88+ font_size_box.get_style_context ().add_class (Gtk.STYLE_CLASS_LINKED);
89+
90+ setting_grid.attach (font_size_box, 0, 0, 1, 1);
91+ setting_grid.attach (new Gtk.Separator (HORIZONTAL), 0, 1, 1, 1);
92+
93+
94+ terminal_binding = new BindingGroup ();
95+ terminal_binding.bind_property ("font-scale", zoom_default_button, "label", SYNC_CREATE, font_scale_to_zoom);
96+
97+
98+ */
99+
100+
51101 // Choose theme section
52102 var color_button_label = new Granite .HeaderLabel (_(" Sticky Note Colour" ));
53103 setting_grid. attach (color_button_label, 0 , 0 , 1 , 1 );
@@ -155,4 +205,10 @@ public class jorts.SettingsPopover : Gtk.Popover {
155205 this . theme_changed(" SLATE" );
156206 });
157207 }
208+
209+ private static bool font_scale_to_zoom (Binding binding , Value font_scale , ref Value label ) {
210+ label. set_string (" %.0f %%" . printf (font_scale. get_double () * 100 ));
211+ return true ;
212+ }
213+
158214}
0 commit comments