From c701c0d6710295b0e719e7a875fd738825a16c09 Mon Sep 17 00:00:00 2001 From: rachytski Date: Tue, 29 May 2012 15:48:11 +0400 Subject: [PATCH] fixes according to code review. --- gui/button.cpp | 13 ++++++++----- gui/button.hpp | 1 - map/framework.hpp | 3 --- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/gui/button.cpp b/gui/button.cpp index c25fd5155c..05ee05bf65 100644 --- a/gui/button.cpp +++ b/gui/button.cpp @@ -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())); - 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); } diff --git a/gui/button.hpp b/gui/button.hpp index 55a956c32c..a44dc97c96 100644 --- a/gui/button.hpp +++ b/gui/button.hpp @@ -3,7 +3,6 @@ #include "element.hpp" #include "../std/function.hpp" -#include "../std/shared_ptr.hpp" #include "../std/string.hpp" namespace yg diff --git a/map/framework.hpp b/map/framework.hpp index 8370480692..4100269955 100644 --- a/map/framework.hpp +++ b/map/framework.hpp @@ -55,7 +55,6 @@ namespace search { class Result; } namespace gui { class Controller; - class Button; } class Framework @@ -67,8 +66,6 @@ protected: scoped_ptr m_guiController; - shared_ptr m_btnDownload; - vector m_bookmarks; scoped_ptr m_renderPolicy;