fixes according to code review.

This commit is contained in:
rachytski 2012-05-29 15:48:11 +04:00 committed by Alex Zolotarev
parent 1b6dc33dae
commit c701c0d671
3 changed files with 8 additions and 9 deletions

View file

@ -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);
}

View file

@ -3,7 +3,6 @@
#include "element.hpp"
#include "../std/function.hpp"
#include "../std/shared_ptr.hpp"
#include "../std/string.hpp"
namespace yg

View file

@ -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;