diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/impprefsfonts.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/linden/indra/newview/impprefsfonts.cpp b/linden/indra/newview/impprefsfonts.cpp index a4dcd34..505761b 100644 --- a/linden/indra/newview/impprefsfonts.cpp +++ b/linden/indra/newview/impprefsfonts.cpp | |||
@@ -51,6 +51,10 @@ ImpPrefsFonts::~ImpPrefsFonts() | |||
51 | 51 | ||
52 | BOOL ImpPrefsFonts::postBuild() | 52 | BOOL ImpPrefsFonts::postBuild() |
53 | { | 53 | { |
54 | childSetValue("ui_scale_slider", gSavedSettings.getF32("UIScaleFactor")); | ||
55 | childSetValue("ui_auto_scale", gSavedSettings.getBOOL("UIAutoScale")); | ||
56 | childSetAction("reset_ui_size", onClickResetUISize, this); | ||
57 | |||
54 | refresh(); | 58 | refresh(); |
55 | return true; | 59 | return true; |
56 | } | 60 | } |
@@ -79,6 +83,9 @@ void ImpPrefsFonts::refresh() | |||
79 | 83 | ||
80 | void ImpPrefsFonts::apply() | 84 | void ImpPrefsFonts::apply() |
81 | { | 85 | { |
86 | gSavedSettings.setF32("UIScaleFactor", childGetValue("ui_scale_slider").asReal()); | ||
87 | gSavedSettings.setBOOL("UIAutoScale", childGetValue("ui_auto_scale")); | ||
88 | |||
82 | bool changed = false; | 89 | bool changed = false; |
83 | 90 | ||
84 | LLRadioGroup* fonts = getChild<LLRadioGroup>("fonts"); | 91 | LLRadioGroup* fonts = getChild<LLRadioGroup>("fonts"); |
@@ -126,3 +133,11 @@ void ImpPrefsFonts::apply() | |||
126 | void ImpPrefsFonts::cancel() | 133 | void ImpPrefsFonts::cancel() |
127 | { | 134 | { |
128 | } | 135 | } |
136 | |||
137 | // static | ||
138 | void ImpPrefsFonts::onClickResetUISize(void* user_data) | ||
139 | { | ||
140 | ImpPrefsFonts* self = (ImpPrefsFonts*)user_data; | ||
141 | F32 def = gSavedSettings.getControl("UIScaleFactor")->getDefault().asReal(); | ||
142 | self->childSetValue("ui_scale_slider", def); | ||
143 | } | ||