forked from organicmaps/organicmaps
fixes according to code review.
This commit is contained in:
parent
1b6dc33dae
commit
c701c0d671
3 changed files with 8 additions and 9 deletions
|
@ -92,9 +92,10 @@ namespace gui
|
|||
if (isDirtyRect())
|
||||
{
|
||||
m_boundRects.clear();
|
||||
m2::RectD rc(0, 0, width() * visualScale(), height() * visualScale());
|
||||
double k = visualScale();
|
||||
m2::RectD rc(0, 0, width() * k, height() * k);
|
||||
rc.Offset(tieRect(rc, math::Identity<double, 3>()));
|
||||
m_boundRects.push_back(m2::AnyRectD(m2::RectD(rc)));
|
||||
m_boundRects.push_back(m2::AnyRectD(rc));
|
||||
setIsDirtyRect(false);
|
||||
}
|
||||
|
||||
|
@ -106,12 +107,14 @@ namespace gui
|
|||
if (!isVisible())
|
||||
return;
|
||||
|
||||
m2::RectD rc(0, 0, width() * visualScale(), height() * visualScale());
|
||||
double k = visualScale();
|
||||
|
||||
m2::RectD rc(0, 0, width() * k, height() * k);
|
||||
rc.Offset(tieRect(rc, m));
|
||||
r->drawRoundedRectangle(rc, 10 * visualScale(), color(state()), depth());
|
||||
r->drawRoundedRectangle(rc, 10 * k, color(state()), depth());
|
||||
|
||||
yg::FontDesc desc = font(state());
|
||||
desc.m_size *= visualScale();
|
||||
desc.m_size *= k;
|
||||
|
||||
r->drawText(desc, pivot(), position(), text(), depth(), false, false);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
#include "element.hpp"
|
||||
|
||||
#include "../std/function.hpp"
|
||||
#include "../std/shared_ptr.hpp"
|
||||
#include "../std/string.hpp"
|
||||
|
||||
namespace yg
|
||||
|
|
|
@ -55,7 +55,6 @@ namespace search { class Result; }
|
|||
namespace gui
|
||||
{
|
||||
class Controller;
|
||||
class Button;
|
||||
}
|
||||
|
||||
class Framework
|
||||
|
@ -67,8 +66,6 @@ protected:
|
|||
|
||||
scoped_ptr<gui::Controller> m_guiController;
|
||||
|
||||
shared_ptr<gui::Button> m_btnDownload;
|
||||
|
||||
vector<BookmarkCategory *> m_bookmarks;
|
||||
|
||||
scoped_ptr<RenderPolicy> m_renderPolicy;
|
||||
|
|
Loading…
Add table
Reference in a new issue