From 36d557ff2a2290ca3f3a66a504852328e6dc32a2 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Thu, 21 Oct 2010 23:28:59 -0500 Subject: Fixed #629: Freeze Frame snapshot option breaks the UI. --- linden/indra/newview/llfloatersnapshot.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/linden/indra/newview/llfloatersnapshot.cpp b/linden/indra/newview/llfloatersnapshot.cpp index c0e972d..a58120d 100644 --- a/linden/indra/newview/llfloatersnapshot.cpp +++ b/linden/indra/newview/llfloatersnapshot.cpp @@ -2128,7 +2128,6 @@ BOOL LLFloaterSnapshot::postBuild() //gSnapshotFloaterView->addChild(this); impl.updateControls(this); - impl.updateLayout(this); return TRUE; } -- cgit v1.1 From b41717bc60cf72aef2257c6573201bd74210c428 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 22 Oct 2010 17:20:34 -0500 Subject: Added FontSizeMultiplier and FontSizeRounding settings. Gives more control over font sizes, addresses font being smaller than some users desire. --- linden/indra/llrender/llfontregistry.cpp | 10 +++++++++- linden/indra/newview/app_settings/settings.xml | 22 ++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/linden/indra/llrender/llfontregistry.cpp b/linden/indra/llrender/llfontregistry.cpp index 9792a91..c5923cd 100644 --- a/linden/indra/llrender/llfontregistry.cpp +++ b/linden/indra/llrender/llfontregistry.cpp @@ -442,7 +442,15 @@ LLFontGL *LLFontRegistry::createFont(const LLFontDescriptor& desc) std::string font_path = local_path + *file_name_it; BOOL is_fallback = !is_first_found; F32 size_mult = (is_fallback ? 1 : match_desc->getSizeMult()); - F32 size = (F32)llround(point_size * size_mult); + if (gSavedSettings.getF32("FontSizeMultiplier") > 0) + { + size_mult *= gSavedSettings.getF32("FontSizeMultiplier"); + } + F32 size = (F32)(point_size * size_mult); + if (gSavedSettings.getBOOL("FontSizeRounding")) + { + size = (F32)llround(size); + } if (!fontp->loadFace(font_path, size, LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback)) { diff --git a/linden/indra/newview/app_settings/settings.xml b/linden/indra/newview/app_settings/settings.xml index 8c280d4..7b37bb6 100644 --- a/linden/indra/newview/app_settings/settings.xml +++ b/linden/indra/newview/app_settings/settings.xml @@ -396,6 +396,28 @@ Value DroidSans + FontSizeMultiplier + + Comment + Multiply all font sizes by this amount. Requires viewer restart. + Persist + 1 + Type + F32 + Value + 1.0 + + FontSizeRounding + + Comment + Round all font sizes to integer values, to potentially reduce font blurriness. The rounding occurs after FontSizeMultiplier is applied. Requires viewer restart. + Persist + 1 + Type + Boolean + Value + 0 + GoAction Comment -- cgit v1.1 From 22df58bd35e75d420c20707d7dffdd322d35e4dc Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 22 Oct 2010 18:06:59 -0500 Subject: Added FontSizeMultiplier and FontSizeRounding controls to Font prefs. --- linden/indra/newview/impprefsfonts.cpp | 50 ++++++++++++++++++++-- .../default/xui/en-us/panel_preferences_fonts.xml | 10 +++++ 2 files changed, 56 insertions(+), 4 deletions(-) diff --git a/linden/indra/newview/impprefsfonts.cpp b/linden/indra/newview/impprefsfonts.cpp index 3ce71eb..bf0b028 100644 --- a/linden/indra/newview/impprefsfonts.cpp +++ b/linden/indra/newview/impprefsfonts.cpp @@ -29,7 +29,9 @@ #include "llviewerprecompiledheaders.h" #include "impprefsfonts.h" +#include "llcheckboxctrl.h" #include "llradiogroup.h" +#include "llspinctrl.h" #include "lluictrlfactory.h" #include "llviewercontrol.h" @@ -61,24 +63,64 @@ void ImpPrefsFonts::refresh() { fonts->setValue( gSavedSettings.getString("FontChoice") ); } + + LLSpinCtrl* font_mult = getChild("font_mult"); + if (font_mult) + { + font_mult->setValue( gSavedSettings.getF32("FontSizeMultiplier") ); + } + + LLCheckBoxCtrl* font_round = getChild("font_round"); + if (font_round) + { + font_round->setValue( gSavedSettings.getBOOL("FontSizeRounding") ); + } } void ImpPrefsFonts::apply() { - LLRadioGroup* fonts = getChild("fonts"); + bool changed = false; + LLRadioGroup* fonts = getChild("fonts"); if (fonts) { std::string font_choice = fonts->getValue().asString(); - if (font_choice != gSavedSettings.getString("FontChoice") && !font_choice.empty()) { gSavedSettings.setString("FontChoice", font_choice); - LLNotifications::instance().add("ChangeFont"); - refresh(); + changed = true; } } + + LLSpinCtrl* font_mult = getChild("font_mult"); + if (font_mult) + { + F32 mult = font_mult->getValue().asReal(); + if (mult != gSavedSettings.getF32("FontSizeMultiplier")) + { + gSavedSettings.setF32("FontSizeMultiplier", mult); + changed = true; + } + } + + LLCheckBoxCtrl* font_round = getChild("font_round"); + if (font_round) + { + bool round = font_round->getValue().asBoolean(); + if (round != gSavedSettings.getBOOL("FontSizeRounding")) + { + gSavedSettings.setBOOL("FontSizeRounding", round); + changed = true; + } + } + + if (changed) + { + refresh(); + LLNotifications::instance().add("ChangeFont"); + } + } void ImpPrefsFonts::cancel() diff --git a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_fonts.xml b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_fonts.xml index 5865bec..c64ce9f 100644 --- a/linden/indra/newview/skins/default/xui/en-us/panel_preferences_fonts.xml +++ b/linden/indra/newview/skins/default/xui/en-us/panel_preferences_fonts.xml @@ -46,4 +46,14 @@ Preview: The quick brown fox jumped over the lazy dog. :) + + + + + -- cgit v1.1 From 421f337df1923be1657ccf10e6a96b6aa5d04967 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 22 Oct 2010 18:09:06 -0500 Subject: Changed Small font size back to 8.5. If this causes blurry fonts for a user, they should enable "Force integer font sizes" in Preferences > Fonts. --- linden/indra/newview/skins/default/xui/en-us/fonts.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linden/indra/newview/skins/default/xui/en-us/fonts.xml b/linden/indra/newview/skins/default/xui/en-us/fonts.xml index 5564079..7343ac2 100644 --- a/linden/indra/newview/skins/default/xui/en-us/fonts.xml +++ b/linden/indra/newview/skins/default/xui/en-us/fonts.xml @@ -153,7 +153,7 @@ /> -- cgit v1.1 From cd14d97b90c0b3270310c00e8a105f17a59d0dcf Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sat, 23 Oct 2010 20:38:54 -0500 Subject: Changed several Preferences modal alerts to notifications. CacheWillClear, CacheWillBeMoved, ChangeConnectionPort, ChangeSkin, and ChangeFont. There are many other alerts that should be made non-modal in the future, but this should prevent a focus fight with the Vivox policy window. --- .../skins/default/xui/en-us/notifications.xml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/linden/indra/newview/skins/default/xui/en-us/notifications.xml b/linden/indra/newview/skins/default/xui/en-us/notifications.xml index 333e362..3b8d19d 100644 --- a/linden/indra/newview/skins/default/xui/en-us/notifications.xml +++ b/linden/indra/newview/skins/default/xui/en-us/notifications.xml @@ -902,32 +902,32 @@ Would you like to disable all popups which can be skipped? + type="notify"> Cache will be cleared after you restart [VIEWER_NAME]. + type="notify"> Cache will be moved after you restart [VIEWER_NAME]. Note: This will clear the cache. + type="notify"> Port settings take effect after you restart [VIEWER_NAME]. + type="notify"> The new skin will appear after you restart [VIEWER_NAME]. @@ -7103,8 +7103,8 @@ Apply this region's settings? ("Ignore" will ignore all region setting + icon="notify.tga" + type="notify"> The new font will appear after you restart [VIEWER_NAME]. -- cgit v1.1