Hotkey to resize fonts
Brought to you by:
bozho
In the interests of making it easier to use the console during a demo, it would be *extremely* helpful if there was a way to bump up the font size of the console without going through the properties dialog.
For instance, I have the font set to "Consolas" or "Lucida Console" and I'm using font smoothing etc, but when I'm demoing something (even for just a couple people crowded around my monitor), my default font size is too small.
In an ideal world, I'd love to be able to ctrl+mousewheel to "zoom" the font size, similar to how it works in other apps (my browser, visual studio/scite, office apps). But I would happily settle for something like Ctrl-Numpad+ and Numpad- to change font size in some increment ...
Logged In: YES
user_id=1664805
Originator: NO
It's not that difficult to catch Ctrl+WM_MOUSEWHEEL, but I got lost in the font handling code.
Here is the first step:
in ConsoleView::OnConsoleFwdMsg, just before TranslateKeyDown add:
if (WM_MOUSEWHEEL == uMsg && wParam & MK_CONTROL) {
short direction = HIWORD(wParam);
// if direction is positive
// increase font size for all tabs
// else
// decrease font size for all tabs
// resize the window
}
Hope it helps a bit.
Logged In: YES
user_id=1664805
Originator: NO
Ok, some experiments later, the following addition to ConsoleView::OnConsoleFwdMsg worked for me:
if (uMsg == WM_MOUSEWHEEL && wParam & MK_CONTROL) {
short direction = HIWORD(wParam);
m_appearanceSettings.fontSettings.dwSize += direction / 120;
RecreateOffscreenBuffers();
m_mainFrame.AdjustWindowSize(false);
RepaintView();
return 0;
}
Also, I had to make MainFrame::AdjustWindowSize public.
Logged In: YES
user_id=1664805
Originator: NO
Please, take a look at the patch [ 1808723 ] Support Ctrl+Mouse Wheel
It's the same code with a bit of clean up.
Logged In: YES
user_id=1253194
Originator: NO
I would also love to see this feature included in Console.
Logged In: YES
user_id=1664805
Originator: NO
Woody,
you can try my *unofficial* build from http://kirill.ca
Note: it's based on b138.
--
Kirill.
I too would very much like to see this feature. Would someone consider doing another build with this patch against the latest release. I'd love to test it for possible inclusion in the next release.
fwiw, I don't think posting here is going to have any effect, the last release was around 18 months ago. Personally, I've moved off Console2 and started using ConEmu.
Jason, my unofficial build from http://kirill.ca still has Ctrl+Mouse Wheel and is now based on the latest official version.
Thanks Kirill - works great!