X-Git-Url: https://git.distorted.org.uk/u/mdw/putty/blobdiff_plain/5165dd4f26a619c4bf8577314599174cef66a977..14ce98878d96729b687fdd3cd734081eb0ef37c6:/windows/wincfg.c diff --git a/windows/wincfg.c b/windows/wincfg.c index 389eb38a..1cf56c81 100644 --- a/windows/wincfg.c +++ b/windows/wincfg.c @@ -30,6 +30,16 @@ static void help_handler(union control *ctrl, void *dlg, } } +static void variable_pitch_handler(union control *ctrl, void *dlg, + void *data, int event) +{ + if (event == EVENT_REFRESH) { + dlg_checkbox_set(ctrl, dlg, !dlg_get_fixed_pitch_flag(dlg)); + } else if (event == EVENT_VALCHANGE) { + dlg_set_fixed_pitch_flag(dlg, !dlg_checkbox_get(ctrl, dlg)); + } +} + void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, int midsession, int protocol) { @@ -177,6 +187,8 @@ void win_setup_config_box(struct controlbox *b, HWND *hwndp, int has_help, */ s = ctrl_getset(b, "Window/Appearance", "font", "Font settings"); + ctrl_checkbox(s, "Allow selection of variable-pitch fonts", NO_SHORTCUT, + HELPCTX(appearance_font), variable_pitch_handler, I(0)); ctrl_radiobuttons(s, "Font quality:", 'q', 2, HELPCTX(appearance_font), dlg_stdradiobutton_handler,