[Konsole-devel] Review Request: Allow floating point font sizes

Christoph Feck christoph at maxiom.de
Sat Oct 24 18:49:16 UTC 2009



> On 2009-10-24 18:27:37, Robert Knight wrote:
> > /trunk/KDE/kdebase/apps/konsole/src/EditProfileDialog.cpp, line 1090
> > <http://reviewboard.kde.org/r/1964/diff/2/?file=13281#file13281line1090>
> >
> >     Can you clarify the comment about anti-aliasing settings.  When the user has anti-aliasing turned off in their settings (by unchecking the 'Smooth fonts' checkbox) the preview should not be aliased.

It was buggy. To reproduce: Enable "Smooth fonts", click "Edit Font...", click "Cancel" -> The preview is reset to non smoothed font. The other comment is actually the reason for the bug.


> On 2009-10-24 18:27:37, Robert Knight wrote:
> > /trunk/KDE/kdebase/apps/konsole/src/EditProfileDialog.cpp, line 469
> > <http://reviewboard.kde.org/r/1964/diff/2/?file=13281#file13281line469>
> >
> >     Where does the '60' come from?

Should be changed to "6 * 10"

6 is the proposed minimum size (taken from the "Decrease Font Size" action)
10 is the scale factor (one decimal digit)

QAbstractSlider does not allow floating point values, so I have to use upscaled values.

Maybe I should replace the constant 10 with a named constant?


> On 2009-10-24 18:27:37, Robert Knight wrote:
> > /trunk/KDE/kdebase/apps/konsole/src/EditProfileDialog.cpp, line 1085
> > <http://reviewboard.kde.org/r/1964/diff/2/?file=13281#file13281line1085>
> >
> >     Rather than repeating the scaling factor in multiple places I suggest adding functions to set the slider range given a font point size range.
> >     
> >     eg: setFontSliderRange(int minPointSize, int maxPointSize) and setFontSliderValue(qreal pointSize) which do the scaling internally.

Yep, will update.


- Christoph


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://reviewboard.kde.org/r/1964/#review2797
-----------------------------------------------------------


On 2009-10-24 16:02:09, Christoph Feck wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://reviewboard.kde.org/r/1964/
> -----------------------------------------------------------
> 
> (Updated 2009-10-24 16:02:09)
> 
> 
> Review request for Konsole.
> 
> 
> Summary
> -------
> 
> This change fixes the following problems:
> 
> - Konsole did not support floating point font sizes in the Profile Editor
> - the font preview did not respect the "antialias" setting when the _tempProfile did not have that setting
> - when cancelling the font dialog the antialias setting was cleared
> - when the choosen font size was 7, but "smallestReadableFont" size was 8, the slider was stuck
> - the maximum slider value only grew as large as the selected font, making it useless to select a larger font using the slider
> 
> I removed the "smallestReadableFont" size query for two reasons:
> 
> - monospaced fonts are often clearer to read, so it makes sense to allow smaller sizes
> - the "Decrease Font Size" action did not respect it anyway
> 
> 
> This addresses bug 173000.
>     https://bugs.kde.org/show_bug.cgi?id=173000
> 
> 
> Diffs
> -----
> 
>   /trunk/KDE/kdebase/apps/konsole/src/EditProfileDialog.cpp 1039697 
>   /trunk/KDE/kdebase/apps/konsole/src/SessionController.cpp 1039697 
> 
> Diff: http://reviewboard.kde.org/r/1964/diff
> 
> 
> Testing
> -------
> 
> Compiles and works good :)
> 
> 
> Thanks,
> 
> Christoph
> 
>




More information about the konsole-devel mailing list