diff options
| author | John Smith <john.smith7545@yahoo.com> | 2012-07-20 06:05:56 +0000 |
|---|---|---|
| committer | John Smith <john.smith7545@yahoo.com> | 2012-07-20 06:05:56 +0000 |
| commit | ebdadb161372149ede63216ac02f4487a553cca7 (patch) | |
| tree | 624b1567d40f9d5e00a006f98691967a9e35f292 /src/widgets/font-selector.cpp | |
| parent | Extensions. Removing the Replace Text extension (replaced with the new Find d... (diff) | |
| download | inkscape-ebdadb161372149ede63216ac02f4487a553cca7.tar.gz inkscape-ebdadb161372149ede63216ac02f4487a553cca7.zip | |
Fix for 940578 : Max font size in toolbar font chooser
(bzr r11558)
Diffstat (limited to 'src/widgets/font-selector.cpp')
| -rw-r--r-- | src/widgets/font-selector.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/widgets/font-selector.cpp b/src/widgets/font-selector.cpp index da87457a5..03d29a753 100644 --- a/src/widgets/font-selector.cpp +++ b/src/widgets/font-selector.cpp @@ -31,6 +31,7 @@ #include "desktop.h" #include "widgets/font-selector.h" +#include "preferences.h" /* SPFontSelector */ @@ -344,11 +345,15 @@ static void sp_font_selector_size_changed( GtkComboBox */*cbox*/, SPFontSelector value = -1; free (text); } + + Inkscape::Preferences *prefs = Inkscape::Preferences::get(); + int max_size = prefs->getInt("/dialogs/textandfont/maxFontSize", 10000); // somewhat arbitrary, but text&font preview freezes with too huge fontsizes + if (value <= 0) { return; // could not parse value } - if (value > 10000) - value = 10000; // somewhat arbitrary, but text&font preview freezes with too huge fontsizes + if (value > max_size) + value = max_size; fsel->fontsize = value; if ( fabs(fsel->fontsize-old_size) > 0.001) |
