aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMcCabe Maxsted2010-10-23 18:46:53 -0700
committerMcCabe Maxsted2010-10-23 18:46:53 -0700
commit856fc5fe875b7544cc21bdd856d7d3a6321c84b8 (patch)
tree6e10961f540f02cc0d2fab5b333ca0d15cb82aa6
parentMerge remote branch 'aleric/weekly' into weekly (diff)
parentChanged several Preferences modal alerts to notifications. (diff)
downloadmeta-impy-856fc5fe875b7544cc21bdd856d7d3a6321c84b8.zip
meta-impy-856fc5fe875b7544cc21bdd856d7d3a6321c84b8.tar.gz
meta-impy-856fc5fe875b7544cc21bdd856d7d3a6321c84b8.tar.bz2
meta-impy-856fc5fe875b7544cc21bdd856d7d3a6321c84b8.tar.xz
Merge remote branch 'jacek/weekly' into weekly
-rw-r--r--linden/indra/llrender/llfontregistry.cpp10
-rw-r--r--linden/indra/newview/app_settings/settings.xml22
-rw-r--r--linden/indra/newview/impprefsfonts.cpp50
-rw-r--r--linden/indra/newview/llfloatersnapshot.cpp1
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/fonts.xml2
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/notifications.xml20
-rw-r--r--linden/indra/newview/skins/default/xui/en-us/panel_preferences_fonts.xml10
7 files changed, 98 insertions, 17 deletions
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)
442 std::string font_path = local_path + *file_name_it; 442 std::string font_path = local_path + *file_name_it;
443 BOOL is_fallback = !is_first_found; 443 BOOL is_fallback = !is_first_found;
444 F32 size_mult = (is_fallback ? 1 : match_desc->getSizeMult()); 444 F32 size_mult = (is_fallback ? 1 : match_desc->getSizeMult());
445 F32 size = (F32)llround(point_size * size_mult); 445 if (gSavedSettings.getF32("FontSizeMultiplier") > 0)
446 {
447 size_mult *= gSavedSettings.getF32("FontSizeMultiplier");
448 }
449 F32 size = (F32)(point_size * size_mult);
450 if (gSavedSettings.getBOOL("FontSizeRounding"))
451 {
452 size = (F32)llround(size);
453 }
446 if (!fontp->loadFace(font_path, size, 454 if (!fontp->loadFace(font_path, size,
447 LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback)) 455 LLFontGL::sVertDPI, LLFontGL::sHorizDPI, 2, is_fallback))
448 { 456 {
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 @@
396 <key>Value</key> 396 <key>Value</key>
397 <string>DroidSans</string> 397 <string>DroidSans</string>
398 </map> 398 </map>
399 <key>FontSizeMultiplier</key>
400 <map>
401 <key>Comment</key>
402 <string>Multiply all font sizes by this amount. Requires viewer restart.</string>
403 <key>Persist</key>
404 <integer>1</integer>
405 <key>Type</key>
406 <string>F32</string>
407 <key>Value</key>
408 <string>1.0</string>
409 </map>
410 <key>FontSizeRounding</key>
411 <map>
412 <key>Comment</key>
413 <string>Round all font sizes to integer values, to potentially reduce font blurriness. The rounding occurs after FontSizeMultiplier is applied. Requires viewer restart.</string>
414 <key>Persist</key>
415 <integer>1</integer>
416 <key>Type</key>
417 <string>Boolean</string>
418 <key>Value</key>
419 <integer>0</integer>
420 </map>
399 <key>GoAction</key> 421 <key>GoAction</key>
400 <map> 422 <map>
401 <key>Comment</key> 423 <key>Comment</key>
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 @@
29#include "llviewerprecompiledheaders.h" 29#include "llviewerprecompiledheaders.h"
30#include "impprefsfonts.h" 30#include "impprefsfonts.h"
31 31
32#include "llcheckboxctrl.h"
32#include "llradiogroup.h" 33#include "llradiogroup.h"
34#include "llspinctrl.h"
33#include "lluictrlfactory.h" 35#include "lluictrlfactory.h"
34 36
35#include "llviewercontrol.h" 37#include "llviewercontrol.h"
@@ -61,24 +63,64 @@ void ImpPrefsFonts::refresh()
61 { 63 {
62 fonts->setValue( gSavedSettings.getString("FontChoice") ); 64 fonts->setValue( gSavedSettings.getString("FontChoice") );
63 } 65 }
66
67 LLSpinCtrl* font_mult = getChild<LLSpinCtrl>("font_mult");
68 if (font_mult)
69 {
70 font_mult->setValue( gSavedSettings.getF32("FontSizeMultiplier") );
71 }
72
73 LLCheckBoxCtrl* font_round = getChild<LLCheckBoxCtrl>("font_round");
74 if (font_round)
75 {
76 font_round->setValue( gSavedSettings.getBOOL("FontSizeRounding") );
77 }
64} 78}
65 79
66void ImpPrefsFonts::apply() 80void ImpPrefsFonts::apply()
67{ 81{
68 LLRadioGroup* fonts = getChild<LLRadioGroup>("fonts"); 82 bool changed = false;
69 83
84 LLRadioGroup* fonts = getChild<LLRadioGroup>("fonts");
70 if (fonts) 85 if (fonts)
71 { 86 {
72 std::string font_choice = fonts->getValue().asString(); 87 std::string font_choice = fonts->getValue().asString();
73
74 if (font_choice != gSavedSettings.getString("FontChoice") && 88 if (font_choice != gSavedSettings.getString("FontChoice") &&
75 !font_choice.empty()) 89 !font_choice.empty())
76 { 90 {
77 gSavedSettings.setString("FontChoice", font_choice); 91 gSavedSettings.setString("FontChoice", font_choice);
78 LLNotifications::instance().add("ChangeFont"); 92 changed = true;
79 refresh();
80 } 93 }
81 } 94 }
95
96 LLSpinCtrl* font_mult = getChild<LLSpinCtrl>("font_mult");
97 if (font_mult)
98 {
99 F32 mult = font_mult->getValue().asReal();
100 if (mult != gSavedSettings.getF32("FontSizeMultiplier"))
101 {
102 gSavedSettings.setF32("FontSizeMultiplier", mult);
103 changed = true;
104 }
105 }
106
107 LLCheckBoxCtrl* font_round = getChild<LLCheckBoxCtrl>("font_round");
108 if (font_round)
109 {
110 bool round = font_round->getValue().asBoolean();
111 if (round != gSavedSettings.getBOOL("FontSizeRounding"))
112 {
113 gSavedSettings.setBOOL("FontSizeRounding", round);
114 changed = true;
115 }
116 }
117
118 if (changed)
119 {
120 refresh();
121 LLNotifications::instance().add("ChangeFont");
122 }
123
82} 124}
83 125
84void ImpPrefsFonts::cancel() 126void ImpPrefsFonts::cancel()
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()
2128 //gSnapshotFloaterView->addChild(this); 2128 //gSnapshotFloaterView->addChild(this);
2129 2129
2130 impl.updateControls(this); 2130 impl.updateControls(this);
2131 impl.updateLayout(this);
2132 2131
2133 return TRUE; 2132 return TRUE;
2134} 2133}
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 @@
153 /> 153 />
154 <font_size name="Small" 154 <font_size name="Small"
155 comment="Size of small font (points, or 1/72 of an inch)" 155 comment="Size of small font (points, or 1/72 of an inch)"
156 size="8" 156 size="8.5"
157 /> 157 />
158</fonts> 158</fonts>
159 159
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 c69e792..0ac7401 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?
902</notification> 902</notification>
903 903
904<notification 904<notification
905 icon="alertmodal.tga" 905 icon="notify.tga"
906 name="CacheWillClear" 906 name="CacheWillClear"
907 type="alertmodal"> 907 type="notify">
908Cache will be cleared after you restart [VIEWER_NAME]. 908Cache will be cleared after you restart [VIEWER_NAME].
909</notification> 909</notification>
910 910
911<notification 911<notification
912 icon="alertmodal.tga" 912 icon="notify.tga"
913 name="CacheWillBeMoved" 913 name="CacheWillBeMoved"
914 type="alertmodal"> 914 type="notify">
915Cache will be moved after you restart [VIEWER_NAME]. 915Cache will be moved after you restart [VIEWER_NAME].
916 916
917Note: This will clear the cache. 917Note: This will clear the cache.
918</notification> 918</notification>
919 919
920<notification 920<notification
921 icon="alertmodal.tga" 921 icon="notify.tga"
922 name="ChangeConnectionPort" 922 name="ChangeConnectionPort"
923 type="alertmodal"> 923 type="notify">
924Port settings take effect after you restart [VIEWER_NAME]. 924Port settings take effect after you restart [VIEWER_NAME].
925</notification> 925</notification>
926 926
927<notification 927<notification
928 icon="alertmodal.tga" 928 icon="notify.tga"
929 name="ChangeSkin" 929 name="ChangeSkin"
930 type="alertmodal"> 930 type="notify">
931The new skin will appear after you restart [VIEWER_NAME]. 931The new skin will appear after you restart [VIEWER_NAME].
932</notification> 932</notification>
933 933
@@ -7104,8 +7104,8 @@ Apply this region's settings? (&quot;Ignore&quot; will ignore all region setting
7104 7104
7105<notification 7105<notification
7106 name="ChangeFont" 7106 name="ChangeFont"
7107 icon="alertmodal.tga" 7107 icon="notify.tga"
7108 type="alertmodal"> 7108 type="notify">
7109The new font will appear after you restart [VIEWER_NAME]. 7109The new font will appear after you restart [VIEWER_NAME].
7110</notification> 7110</notification>
7111 7111
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 @@
46 Preview: The quick brown fox jumped over the lazy dog. :) 46 Preview: The quick brown fox jumped over the lazy dog. :)
47 </text> 47 </text>
48 48
49
50 <spinner name="font_mult" label="Font size multiplier:" label_width="130"
51 bottom="-280" left="20" height="16" width="180" follows="left|top"
52 decimal_digits="2" increment="0.01" max_val="3.0" min_val="0.1"
53 tool_tip="Multiply all font sizes by this amount." />
54
55 <check_box name="font_round" follows="left|top"
56 bottom="-300" left="20" height="16" width="300"
57 label="Force integer font sizes (may fix blurry fonts)" />
58
49</panel> 59</panel>