[PATCH] kfontchooser and konsole
Sean Harmer
sh at theharmers.co.uk
Fri Oct 19 11:47:38 BST 2007
Hi,
After attending the Munich devdays and hearing Aaron, Till and others swear
when accidentally changing the font family when they intended to change the
font size in konsole for presentations, I thought I'd fix it. It does seem
that changing the font size is the most common action when using the font
dialog. The first patch below simply sets the focus onto the size list when
the font dialog is constructed.
Whilst doing this I came across a TODO comment in the konsole source which
said that it would be nice to restrict the font selection in konsole to fixed
width fonts only. The second patch below achieves this.
The api for restricting to fixed width fonts in KFontDialog and KFontChooser
is not very nice or intuitive though. You can request fixed width fonts inthe
constructor, but you can then (too easily) override this with future calls to
the setFont function which takes a bool parameter specifying if you want only
fixed fonts or not.
However, I guess it is too late in the day to fix the API for this by adding a
setRestrictFonts( const KFontChooser::DisplayFlags& flags ) member and
removing the bool parameter from setFont(). If it's not too late and you
would like me to do this, then please just ask.
I'll leave it for somebody with more experience to commit/reject these
patches.
Kind regards,
Sean Harmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AdjustFontSize.patch
Type: text/x-diff
Size: 529 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071019/2975dc6f/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: KonsoleFixedFontsOnly.patch
Type: text/x-diff
Size: 851 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20071019/2975dc6f/attachment-0001.patch>
More information about the kde-core-devel
mailing list