Skip to content
Snippets Groups Projects
Commit 9771a7f4 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Expanded chat font size options including Monospace and Huge

parent 3ad486f2
No related branches found
No related tags found
No related merge requests found
...@@ -1019,7 +1019,7 @@ LLFontGL* LLFontGL::getFontSansSerifBig() ...@@ -1019,7 +1019,7 @@ LLFontGL* LLFontGL::getFontSansSerifBig()
//static //static
LLFontGL* LLFontGL::getFontSansSerifHuge() LLFontGL* LLFontGL::getFontSansSerifHuge()
{ {
static LLFontGL* fontp = getFont(LLFontDescriptor("SansSerif","Large",0)); static LLFontGL* fontp = getFont(LLFontDescriptor("SansSerif","Huge",0));
return fontp; return fontp;
} }
......
...@@ -103,22 +103,26 @@ void LLConsole::reshape(S32 width, S32 height, BOOL called_from_parent) ...@@ -103,22 +103,26 @@ void LLConsole::reshape(S32 width, S32 height, BOOL called_from_parent)
void LLConsole::setFontSize(S32 size_index) void LLConsole::setFontSize(S32 size_index)
{ {
if (-1 == size_index) switch (size_index)
{ {
case -1:
mFont = LLFontGL::getFontMonospace(); mFont = LLFontGL::getFontMonospace();
} break;
else if (0 == size_index) case 0:
{ mFont = LLFontGL::getFontSansSerifSmall();
break;
default:
case 1:
mFont = LLFontGL::getFontSansSerif(); mFont = LLFontGL::getFontSansSerif();
} break;
else if (1 == size_index) case 2:
{
mFont = LLFontGL::getFontSansSerifBig(); mFont = LLFontGL::getFontSansSerifBig();
} break;
else case 3:
{
mFont = LLFontGL::getFontSansSerifHuge(); mFont = LLFontGL::getFontSansSerifHuge();
break;
} }
// Make sure the font exists // Make sure the font exists
if (mFont == NULL) if (mFont == NULL)
{ {
......
...@@ -59,6 +59,7 @@ ...@@ -59,6 +59,7 @@
#include "llmultigesture.h" #include "llmultigesture.h"
#include "llui.h" #include "llui.h"
#include "lluictrlfactory.h" #include "lluictrlfactory.h"
#include "llviewerchat.h"
// [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b) // [RLVa:KB] - Checked: 2010-02-27 (RLVa-1.2.0b)
#include "rlvactions.h" #include "rlvactions.h"
#include "rlvcommon.h" #include "rlvcommon.h"
...@@ -133,6 +134,8 @@ BOOL LLChatBar::postBuild() ...@@ -133,6 +134,8 @@ BOOL LLChatBar::postBuild()
mInputEditor->setMaxTextLength(DB_CHAT_MSG_STR_LEN); mInputEditor->setMaxTextLength(DB_CHAT_MSG_STR_LEN);
mInputEditor->setEnableLineHistory(TRUE); mInputEditor->setEnableLineHistory(TRUE);
mInputEditor->setFont(LLViewerChat::getChatFont());
mIsBuilt = TRUE; mIsBuilt = TRUE;
......
...@@ -224,6 +224,7 @@ void LLFloaterIMNearbyChat::reloadMessages(bool clean_messages/* = false*/) ...@@ -224,6 +224,7 @@ void LLFloaterIMNearbyChat::reloadMessages(bool clean_messages/* = false*/)
// Update the messages without re-writing them to a log file. // Update the messages without re-writing them to a log file.
addMessage(*it,false, do_not_log); addMessage(*it,false, do_not_log);
} }
mInputEditor->setFont(LLViewerChat::getChatFont());
} }
void LLFloaterIMNearbyChat::loadHistory() void LLFloaterIMNearbyChat::loadHistory()
......
...@@ -538,10 +538,6 @@ void LLFloaterPreference::saveAvatarProperties( void ) ...@@ -538,10 +538,6 @@ void LLFloaterPreference::saveAvatarProperties( void )
BOOL LLFloaterPreference::postBuild() BOOL LLFloaterPreference::postBuild()
{ {
gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLFloaterIMSessionTab::processChatHistoryStyleUpdate, false));
gSavedSettings.getControl("ChatFontSize")->getSignal()->connect(boost::bind(&LLViewerChat::signalChatFontChanged));
gSavedSettings.getControl("ChatBubbleOpacity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onNameTagOpacityChange, this, _2)); gSavedSettings.getControl("ChatBubbleOpacity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onNameTagOpacityChange, this, _2));
gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeMaturity, this)); gSavedSettings.getControl("PreferredMaturity")->getSignal()->connect(boost::bind(&LLFloaterPreference::onChangeMaturity, this));
......
...@@ -190,6 +190,9 @@ LLFontGL* LLViewerChat::getChatFont() ...@@ -190,6 +190,9 @@ LLFontGL* LLViewerChat::getChatFont()
LLFontGL* fontp = NULL; LLFontGL* fontp = NULL;
switch(font_size) switch(font_size)
{ {
case -1:
fontp = LLFontGL::getFontMonospace();
break;
case 0: case 0:
fontp = LLFontGL::getFontSansSerifSmall(); fontp = LLFontGL::getFontSansSerifSmall();
break; break;
...@@ -200,6 +203,9 @@ LLFontGL* LLViewerChat::getChatFont() ...@@ -200,6 +203,9 @@ LLFontGL* LLViewerChat::getChatFont()
case 2: case 2:
fontp = LLFontGL::getFontSansSerifBig(); fontp = LLFontGL::getFontSansSerifBig();
break; break;
case 3:
fontp = LLFontGL::getFontSansSerifHuge();
break;
} }
return fontp; return fontp;
......
...@@ -79,6 +79,8 @@ ...@@ -79,6 +79,8 @@
#include "rlvactions.h" #include "rlvactions.h"
#include "rlvcommon.h" #include "rlvcommon.h"
// [/RLVa:KB] // [/RLVa:KB]
#include "llfloaterimsessiontab.h"
#include "llviewerchat.h"
// Third party library includes // Third party library includes
#include <boost/algorithm/string.hpp> #include <boost/algorithm/string.hpp>
...@@ -342,6 +344,10 @@ static bool handleChatFontSizeChanged(const LLSD& newvalue) ...@@ -342,6 +344,10 @@ static bool handleChatFontSizeChanged(const LLSD& newvalue)
{ {
gConsole->setFontSize(newvalue.asInteger()); gConsole->setFontSize(newvalue.asInteger());
} }
LLViewerChat::signalChatFontChanged();
LLFloaterIMSessionTab::processChatHistoryStyleUpdate(false);
return true; return true;
} }
......
...@@ -68,6 +68,10 @@ ...@@ -68,6 +68,10 @@
name="chat_font_size" name="chat_font_size"
top_pad="5" top_pad="5"
width="100"> width="100">
<item
label="Monospace"
name="Monospace"
value="-1"/>
<item <item
label="Small" label="Small"
name="Small" name="Small"
...@@ -79,7 +83,11 @@ ...@@ -79,7 +83,11 @@
<item <item
label="Large" label="Large"
name="Large" name="Large"
value="2"/> value="2"/>
<item
label="Huge"
name="Huge"
value="3"/>
</combo_box> </combo_box>
<check_box <check_box
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment