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
path: root/gui
diff options
context:
space:
mode:
authorExMix <rahuba.youri@gmail.com>2013-05-02 15:08:41 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:54:13 +0300
commit67c6edcc62b24b1f66981a4a6b21bb097aa4664d (patch)
tree0a5f056c0e6194505754e3f5d239bc79a025d25e /gui
parentf2f0f6e3082799584ea851ef737d9cf7e4e2efec (diff)
download button fix
Diffstat (limited to 'gui')
-rw-r--r--gui/text_view.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/gui/text_view.cpp b/gui/text_view.cpp
index cec1b7d882..5f2a692c05 100644
--- a/gui/text_view.cpp
+++ b/gui/text_view.cpp
@@ -3,6 +3,7 @@
#include "../graphics/display_list.hpp"
#include "../graphics/screen.hpp"
+#include "../geometry/transformations.hpp"
namespace gui
{
@@ -42,7 +43,7 @@ namespace gui
params.m_fontDesc = font(state);
params.m_fontDesc.m_size *= visualScale();
params.m_log2vis = true;
- params.m_pivot = pivot();
+ params.m_pivot = m2::PointD(0.0, 0.0);
params.m_position = position();
params.m_glyphCache = m_controller->GetGlyphCache();
params.m_logText = strings::MakeUniString(m_text);
@@ -99,8 +100,11 @@ namespace gui
map<EState, shared_ptr<graphics::DisplayList> >::const_iterator it;
it = m_dls.find(state());
+ math::Matrix<double, 3, 3> drawM = math::Shift(math::Identity<double, 3>(),
+ pivot());
+
if (it != m_dls.end())
- r->drawDisplayList(it->second.get(), m);
+ r->drawDisplayList(it->second.get(), drawM * m);
else
LOG(LWARNING, ("m_dls[state()] is not set!"));
}
@@ -116,13 +120,15 @@ namespace gui
map<EState, shared_ptr<graphics::StraightTextElement> >::const_iterator it;
it = m_elems.find(EActive);
+ m2::PointD pt = pivot();
+
if (it != m_elems.end())
- m_boundRects.push_back(m2::AnyRectD(it->second->roughBoundRect()));
+ m_boundRects.push_back(m2::AnyRectD(Offset(it->second->roughBoundRect(), pt)));
it = m_elems.find(EPressed);
if (it != m_elems.end())
- m_boundRects.push_back(m2::AnyRectD(it->second->roughBoundRect()));
+ m_boundRects.push_back(m2::AnyRectD(Offset(it->second->roughBoundRect(), pt)));
setIsDirtyRect(false);
}