summaryrefslogtreecommitdiff
path: root/indra/llui/llmenugl.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2026-04-10 13:10:01 -0400
committerGitHub <noreply@github.com>2026-04-10 13:10:01 -0400
commit8ffb73b4c0f5141d03cbbdfa8213421effed8eb0 (patch)
treea964a5bba0e8d8e8bbe288cff98a357cbdc7daab /indra/llui/llmenugl.cpp
parentf4bc7652f8ec4dac7c41e40287615c56ac1cec10 (diff)
parent7fc1d9a1aec58acfc4359ffa45c8b1ce342fb2d8 (diff)
Merge pull request #5475 from secondlife/project/Flat_UI
Flat UI Alpha
Diffstat (limited to 'indra/llui/llmenugl.cpp')
-rw-r--r--indra/llui/llmenugl.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/indra/llui/llmenugl.cpp b/indra/llui/llmenugl.cpp
index 6ba31c251e..3b21ed8f47 100644
--- a/indra/llui/llmenugl.cpp
+++ b/indra/llui/llmenugl.cpp
@@ -73,7 +73,7 @@ S32 MENU_BAR_WIDTH = 410;
/// Local function declarations, constants, enums, and typedefs
///============================================================================
-const S32 LABEL_BOTTOM_PAD_PIXELS = 2;
+const S32 LABEL_BOTTOM_PAD_PIXELS = 1;
const U32 LEFT_PAD_PIXELS = 3;
const U32 LEFT_WIDTH_PIXELS = 15;
@@ -519,21 +519,25 @@ void LLMenuItemGL::draw( void )
}
else
{
+ // Munus are all of the same size, so fixed offset works here,
+ // but it won't work if somebody decides to use different font
+ // todo: adjust logic to work of rect and font height
+ F32 y = (F32)MENU_ITEM_PADDING / 2.f;
if( !mDrawBoolLabel.empty() )
{
- mFont->render( mDrawBoolLabel.getWString(), 0, (F32)LEFT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color,
+ mFont->render( mDrawBoolLabel.getWString(), 0, (F32)LEFT_PAD_PIXELS, y, color,
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false );
}
- mFont->render( mLabel.getWString(), 0, (F32)LEFT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color,
+ mFont->render( mLabel.getWString(), 0, (F32)LEFT_PLAIN_PIXELS, y, color,
LLFontGL::LEFT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false );
if( !mDrawAccelLabel.empty() )
{
- mFont->render( mDrawAccelLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PLAIN_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color,
+ mFont->render( mDrawAccelLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PLAIN_PIXELS, y, color,
LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false );
}
if( !mDrawBranchLabel.empty() )
{
- mFont->render( mDrawBranchLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PAD_PIXELS, ((F32)MENU_ITEM_PADDING / 2.f), color,
+ mFont->render( mDrawBranchLabel.getWString(), 0, (F32)getRect().mRight - (F32)RIGHT_PAD_PIXELS, y, color,
LLFontGL::RIGHT, LLFontGL::BOTTOM, LLFontGL::NORMAL, LLFontGL::NO_SHADOW, S32_MAX, S32_MAX, NULL, false );
}
}
@@ -1638,6 +1642,9 @@ void LLMenuItemBranchDownGL::draw( void )
{
color = mDisabledColor.get();
}
+ // Munus are all of the same size, so fixed offset works here,
+ // but it won't work if somebody decides to use different font
+ // todo: adjust logic to work of rect and font height
getFont()->render( mLabel.getWString(), 0, (F32)getRect().getWidth() / 2.f, (F32)LABEL_BOTTOM_PAD_PIXELS, color,
LLFontGL::HCENTER, LLFontGL::BOTTOM, LLFontGL::NORMAL);