Skip to content
Snippets Groups Projects
Commit 3f83c05f authored by James Cook's avatar James Cook
Browse files

EXT-4341 "Create> New" and "rename" text presents malaligned

Fixed size and position of renamer line editor
Reviewed with Richard
parent 9d7108e8
No related branches found
No related tags found
No related merge requests found
...@@ -78,7 +78,7 @@ ...@@ -78,7 +78,7 @@
///---------------------------------------------------------------------------- ///----------------------------------------------------------------------------
const S32 RENAME_WIDTH_PAD = 4; const S32 RENAME_WIDTH_PAD = 4;
const S32 RENAME_HEIGHT_PAD = 2; const S32 RENAME_HEIGHT_PAD = 1;
const S32 AUTO_OPEN_STACK_DEPTH = 16; const S32 AUTO_OPEN_STACK_DEPTH = 16;
const S32 MIN_ITEM_WIDTH_VISIBLE = LLFolderViewItem::ICON_WIDTH const S32 MIN_ITEM_WIDTH_VISIBLE = LLFolderViewItem::ICON_WIDTH
+ LLFolderViewItem::ICON_PAD + LLFolderViewItem::ICON_PAD
...@@ -2221,10 +2221,9 @@ void LLFolderView::updateRenamerPosition() ...@@ -2221,10 +2221,9 @@ void LLFolderView::updateRenamerPosition()
{ {
if(mRenameItem) if(mRenameItem)
{ {
LLFontGL* font = getLabelFontForStyle(mLabelStyle); // See also LLFolderViewItem::draw()
S32 x = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mRenameItem->getIndentation();
S32 x = ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD - 1 + mRenameItem->getIndentation(); S32 y = mRenameItem->getRect().getHeight() - mRenameItem->getItemHeight() - RENAME_HEIGHT_PAD;
S32 y = llfloor(mRenameItem->getRect().getHeight() - font->getLineHeight()-2);
mRenameItem->localPointToScreen( x, y, &x, &y ); mRenameItem->localPointToScreen( x, y, &x, &y );
screenPointToLocal( x, y, &x, &y ); screenPointToLocal( x, y, &x, &y );
mRenamer->setOrigin( x, y ); mRenamer->setOrigin( x, y );
...@@ -2236,7 +2235,7 @@ void LLFolderView::updateRenamerPosition() ...@@ -2236,7 +2235,7 @@ void LLFolderView::updateRenamerPosition()
} }
S32 width = llmax(llmin(mRenameItem->getRect().getWidth() - x, scroller_rect.getWidth() - x - getRect().mLeft), MINIMUM_RENAMER_WIDTH); S32 width = llmax(llmin(mRenameItem->getRect().getWidth() - x, scroller_rect.getWidth() - x - getRect().mLeft), MINIMUM_RENAMER_WIDTH);
S32 height = llfloor(font->getLineHeight() + RENAME_HEIGHT_PAD); S32 height = mRenameItem->getItemHeight() - RENAME_HEIGHT_PAD;
mRenamer->reshape( width, height, TRUE ); mRenamer->reshape( width, height, TRUE );
} }
} }
......
...@@ -855,6 +855,7 @@ void LLFolderViewItem::draw() ...@@ -855,6 +855,7 @@ void LLFolderViewItem::draw()
ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, arrow_image->getImage(), sFgColor); ARROW_SIZE, ARROW_SIZE, mControlLabelRotation, arrow_image->getImage(), sFgColor);
} }
// See also LLFolderView::updateRenamerPosition()
F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation); F32 text_left = (F32)(ARROW_SIZE + TEXT_PAD + ICON_WIDTH + ICON_PAD + mIndentation);
LLFontGL* font = getLabelFontForStyle(mLabelStyle); LLFontGL* font = getLabelFontForStyle(mLabelStyle);
......
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