QtConsole zoom adjustments #494

Closed
wants to merge 3 commits into
from

Conversation

Projects
None yet
3 participants
Contributor

mspacek commented Jun 1, 2011

don't set point size less than 1 in ConsoleWidget: fixes #493
adjust/add key binding for zoom out/reset.

Owner

minrk commented Jun 1, 2011

Thanks for the catch, but if we are putting a limit, shouldn't it be more like 4? I don't think there's any use to letting people set the font size to illegibly small sizes.

Contributor

mspacek commented Jun 1, 2011

Good point. But sometimes I find it can be nice to shrink the font as much as possible so you can get a really high level view of the whole thing - indentation, paragraphs, etc.. Of course, you can't read 1 pt text, but you can't really read 4 pt text either.

Contributor

mspacek commented Jun 1, 2011

While I'm at it, I have another couple of commits, one which binds Ctrl+0 to restore the default font size, and another that changes the increase font size key binding from Ctrl++ to Ctrl+= (which means you don't have to hit the shift key). Seems like a good fit here, but maybe they won't be accepted as quickly. Should I make yet another branch for those?

Owner

minrk commented Jun 1, 2011

Fair enough - 4pt legibility depends on the typeface, but 1pt is just lines. Leaving it at 1 is fine for the zoom-out use (I guess that's why you are the first to notice this error).

Owner

minrk commented Jun 1, 2011

Go ahead and do it here - I'll just rename the PR to reflect the change.

Owner

minrk commented Jun 1, 2011

On the issue of +/=, I would make it work with both, rather than changing it to the exclusion of '+'.

Contributor

mspacek commented Jun 1, 2011

That last commit is maybe controversial. QtGui.qApp.font().pointSize() seems to return 9 on my system, which I find too small. 9 pt is what I use as an application/document/desktop font in Ubuntu, but for fixed-width I use 10 pt or more. I don't suppose there's a way to automatically find the system's fixed-width font is there? Or perhaps having a _default_font_size attrib will be useful for the config system anyway?

Owner

minrk commented Jun 1, 2011

The default fontsize will be configurable once #492 is merged, so I would rollback that commit.

Owner

minrk commented Jun 1, 2011

Also, the hardcoding of a default value is not a great idea, because the logical default size will depend on the system display DPI. For instance, on my Mac, Qt's default font size is 13, and on my Ubuntu machine it's 8. Both appear about the same size.

Contributor

mspacek commented Jun 1, 2011

OK. I think I rolled it back correctly. I used git reset --hard HEAD~1followed by git push --force upstream. Git stresses me out :)

Owner

minrk commented Jun 1, 2011

Yes, looks like you did it right. When I rollback, I often just paste the commit hash I want to reset to: git reset --hard <hash> and git push -f.

This looks good to me, thanks!
@epatters, any objections?

Contributor

epatters commented Jun 1, 2011

Looks good to me. Thanks for the fix.

minrk closed this in 657504e Jun 1, 2011

@mattvonrocketstein mattvonrocketstein pushed a commit to mattvonrocketstein/ipython that referenced this pull request Nov 3, 2014

@minrk minrk Merge PR #494
closes gh-494
4066cc2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment