Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorExMix <rahuba.youri@mapswithme.com>2014-03-07 16:05:57 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 02:12:40 +0300
commit69f6e406743e9bfa4813989cec71d9465b1524e2 (patch)
tree98ec8f1e4163bcfced4abafcd37499c51401ccd9 /map/information_display.cpp
parentaa9010fa705edb99280619e9e74e04fbff2b0430 (diff)
new ruler with chess and poetesses
Diffstat (limited to 'map/information_display.cpp')
-rw-r--r--map/information_display.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/map/information_display.cpp b/map/information_display.cpp
index 3ef44fd125..b3ffd59ed2 100644
--- a/map/information_display.cpp
+++ b/map/information_display.cpp
@@ -29,7 +29,9 @@
namespace
{
- static int const FONT_SIZE = 10;
+ static int const RULLER_X_OFFSET = 65;
+ static int const RULLER_Y_OFFSET = 15;
+ static int const FONT_SIZE = 14;
static int const COMPASS_W_OFFSET = 13;
static int const COMPASS_H_OFFSET = 71;
}
@@ -53,6 +55,7 @@ InformationDisplay::InformationDisplay(Framework * fw)
enableBenchmarkInfo(false);
enableCountryStatusDisplay(false);
m_compassArrow->setIsVisible(false);
+ m_ruler->setIsVisible(false);
for (int i = 0; i < sizeof(m_DebugPts) / sizeof(m2::PointD); ++i)
m_DebugPts[i] = m2::PointD(0, 0);
@@ -65,7 +68,7 @@ void InformationDisplay::InitRuler(Framework * fw)
Ruler::Params p;
p.m_depth = graphics::rulerDepth;
- p.m_position = graphics::EPosAboveLeft;
+ p.m_position = graphics::EPosAboveRight;
p.m_framework = fw;
m_ruler.reset(new Ruler(p));
@@ -156,8 +159,8 @@ void InformationDisplay::setDisplayRect(m2::RectI const & rect)
{
m_displayRect = rect;
- m2::PointD pt(m2::PointD(m_displayRect.maxX() - 30 * m_visualScale,
- m_displayRect.maxY() - 10 * m_visualScale));
+ m2::PointD pt(m2::PointD(m_displayRect.minX() + RULLER_X_OFFSET * m_visualScale,
+ m_displayRect.maxY() - RULLER_Y_OFFSET * m_visualScale));
m_ruler->setPivot(pt);
@@ -189,7 +192,15 @@ void InformationDisplay::drawDebugPoints(Drawer * pDrawer)
void InformationDisplay::enableRuler(bool doEnable)
{
- m_ruler->setIsVisible(doEnable);
+ if (doEnable)
+ m_ruler->AnimateShow();
+ else
+ m_ruler->AnimateHide();
+}
+
+bool InformationDisplay::isRulerEnabled() const
+{
+ return m_ruler->isVisible();
}
void InformationDisplay::setRulerParams(unsigned pxMinWidth, double metresMinWidth, double metresMaxWidth)