Fine-tune ruler and coordiantes margins.

This commit is contained in:
Yury Melnichek 2011-11-08 02:13:56 +01:00 committed by Alex Zolotarev
parent 5b2f13750b
commit 8b936cc377
3 changed files with 12 additions and 9 deletions

View file

@ -108,7 +108,7 @@ Framework<TModel>::Framework(shared_ptr<WindowHandle> windowHandle,
#if defined(OMIM_OS_MAC) || defined(OMIM_OS_WINDOWS) || defined(OMIM_OS_LINUX)
m_minRulerWidth(97),
#else
m_minRulerWidth(48),
m_minRulerWidth(60),
#endif
m_centeringMode(EDoNothing)
// m_tileSize(GetPlatform().TileSize())

View file

@ -91,11 +91,13 @@ void InformationDisplay::drawRuler(DrawerYG * pDrawer)
m_ruler.setVisualScale(m_visualScale);
#ifdef OMIM_OS_IPHONE
m2::PointD pivot(m2::PointD(m_displayRect.maxX(), m_displayRect.maxY() - m_bottomShift * m_visualScale)
m2::PointD pivot(m2::PointD(m_displayRect.maxX(),
m_displayRect.maxY() - 20 * m_visualScale)
+ m2::PointD(-10 * m_visualScale, -10 * m_visualScale));
m_ruler.setPosition(yg::EPosAboveLeft);
#else
m2::PointD pivot(m2::PointD(m_displayRect.minX(), m_displayRect.maxY() - m_bottomShift * m_visualScale)
m2::PointD pivot(m2::PointD(m_displayRect.minX(),
m_displayRect.maxY() - m_bottomShift * m_visualScale)
+ m2::PointD(10 * m_visualScale, -10 * m_visualScale));
m_ruler.setPosition(yg::EPosAboveRight);
@ -138,14 +140,15 @@ void InformationDisplay::drawCenter(DrawerYG * drawer)
params.m_log2vis = false;
#ifdef OMIM_OS_IPHONE
params.m_pivot = m2::PointD(m_displayRect.maxX() - 10 * m_visualScale,
m_displayRect.maxY() - 20 * m_visualScale - 5);
params.m_pivot = m2::PointD(m_displayRect.maxX() - 5 * m_visualScale,
m_displayRect.maxY() - 5 * m_visualScale);
params.m_position = yg::EPosAboveLeft;
#else
params.m_pivot = m2::PointD(m_displayRect.maxX() - 10 * m_visualScale,
m_displayRect.maxY() - (/*m_bottomShift*/ + 14) * m_visualScale - 5);
params.m_position = yg::EPosAboveLeft;
#endif
params.m_position = yg::EPosAboveLeft;
params.m_glyphCache = drawer->screen()->glyphCache();
params.m_logText = strings::MakeUniString(out.str());

View file

@ -281,7 +281,7 @@ void Ruler::draw(yg::gl::OverlayRenderer * s, math::Matrix<double, 3, 3> const &
if (position() & yg::EPosLeft)
s->drawText(m_fontDesc,
m_path[2] + m2::PointD(-7, -7),
m_path[2] + m2::PointD(-7, -3),
yg::EPosAboveLeft,
m_scalerText.c_str(),
depth(),
@ -289,14 +289,14 @@ void Ruler::draw(yg::gl::OverlayRenderer * s, math::Matrix<double, 3, 3> const &
else
if (position() & yg::EPosRight)
s->drawText(m_fontDesc,
m_path[1] + m2::PointD(7, -7),
m_path[1] + m2::PointD(7, -3),
yg::EPosAboveRight,
m_scalerText.c_str(),
depth(),
false);
else
s->drawText(m_fontDesc,
(m_path[1] + m_path[2]) * 0.5 + m2::PointD(0, -7),
(m_path[1] + m_path[2]) * 0.5 + m2::PointD(0, -3),
yg::EPosAbove,
m_scalerText.c_str(),
depth(),