Fixed RatingComponent height on ScraperSearchComponent.

Removed clip rect for TextComponent.  Needed to set TextComponent texst area size to letter height keep spacing right, but special characters like ()[!] drop lower even when capitalized, and would get cut off.
This commit is contained in:
Aloshi 2014-04-19 16:29:59 -05:00
parent f601531ec6
commit b4f6f98e1a
3 changed files with 6 additions and 10 deletions

View file

@ -134,7 +134,7 @@ void ScraperSearchComponent::onSizeChanged()
mMD_Grid->setColWidthPerc(0, maxLblWidth / mMD_Grid->getSize().x());
// rating is manually sized
mMD_Rating->setSize(mMD_Grid->getColWidth(1), fontLbl->getLetterHeight());
mMD_Rating->setSize(mMD_Grid->getColWidth(1), fontLbl->getHeight() * 0.65f);
mMD_Grid->onSizeChanged();
// make result font follow label font
@ -147,8 +147,6 @@ void ScraperSearchComponent::onSizeChanged()
mGrid.onSizeChanged();
mBusyAnim.setSize(mSize);
//mBusyAnim.setPosition(mSearchType == ALWAYS_ACCEPT_FIRST_RESULT ? mDescContainer->getPosition() : mResultList->getPosition());
//mBusyAnim.setSize(mSearchType == ALWAYS_ACCEPT_FIRST_RESULT ? mDescContainer->getSize() : mResultList->getSize());
}
void ScraperSearchComponent::updateViewStyle()

View file

@ -67,10 +67,11 @@ void TextComponent::render(const Eigen::Affine3f& parentTrans)
{
Eigen::Affine3f trans = parentTrans * getTransform();
Eigen::Vector3f dim(mSize.x(), mSize.y(), 0);
/*Eigen::Vector3f dim(mSize.x(), mSize.y(), 0);
dim = trans * dim - trans.translation();
Renderer::pushClipRect(Eigen::Vector2i((int)trans.translation().x(), (int)trans.translation().y()),
Eigen::Vector2i((int)(dim.x() + 0.5f), (int)(dim.y() + 0.5f)));
*/
if(mTextCache)
{
@ -110,7 +111,7 @@ void TextComponent::render(const Eigen::Affine3f& parentTrans)
mFont->renderTextCache(mTextCache.get());
}
Renderer::popClipRect();
//Renderer::popClipRect();
}
void TextComponent::calculateExtent()

View file

@ -129,11 +129,8 @@ GuiMetaDataEd::GuiMetaDataEd(Window* window, MetaDataList* md, const std::vector
mButtons = makeButtonGrid(mWindow, buttons);
mGrid.setEntry(mButtons, Vector2i(0, 2), true, false);
// initially put cursor on "SCRAPE"
mGrid.setCursorTo(mButtons);
// resize + center
setSize(Renderer::getScreenWidth() * 0.5f, Renderer::getScreenHeight() * 0.71f);
setSize(Renderer::getScreenWidth() * 0.5f, Renderer::getScreenHeight() * 0.82f);
setPosition((Renderer::getScreenWidth() - mSize.x()) / 2, (Renderer::getScreenHeight() - mSize.y()) / 2);
}
@ -144,7 +141,7 @@ void GuiMetaDataEd::onSizeChanged()
mGrid.setSize(mSize);
const float titleHeight = mTitle->getFont()->getLetterHeight();
const float subtitleHeight = mSubtitle->getFont()->getLetterHeight() + 2;
const float subtitleHeight = mSubtitle->getFont()->getLetterHeight();
const float titleSubtitleSpacing = mSize.y() * 0.03f;
mGrid.setRowHeightPerc(0, (titleHeight + titleSubtitleSpacing + subtitleHeight + TITLE_VERT_PADDING) / mSize.y());