summaryrefslogtreecommitdiff
path: root/hud
diff options
authorAndrea Azzarone <azzaronea@gmail.com>2012-05-30 21:47:20 +0200
committerAndrea Azzarone <azzaronea@gmail.com>2012-05-30 21:47:20 +0200
commit7337d2046e15ae435f5ef6aa83bc5dfa8786ef0a (patch)
tree19fab9c38ad09e3e1988681c001ad0313e1e5124 /hud
parentd6b363260aaa5291d9b710eccb6283337a89cd40 (diff)
Remove magic number.
(bzr r2370.1.5)
Diffstat (limited to 'hud')
-rw-r--r--hud/HudButton.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/hud/HudButton.cpp b/hud/HudButton.cpp
index f5e0d6d48..a5575554d 100644
--- a/hud/HudButton.cpp
+++ b/hud/HudButton.cpp
@@ -42,6 +42,9 @@
namespace
{
nux::logging::Logger logger("unity.hud.HudButton");
+
+const int hlayout_left_padding = 46;
+const char* const button_font = "Ubuntu 13"; // 17px = 13
}
namespace unity
@@ -55,7 +58,7 @@ HudButton::HudButton(NUX_FILE_LINE_DECL)
, is_focused_(false)
{
hlayout_ = new nux::HLayout(NUX_TRACKER_LOCATION);
- hlayout_->SetLeftAndRightPadding(46, -1);
+ hlayout_->SetLeftAndRightPadding(hlayout_left_padding, -1);
SetLayout(hlayout_);
InitTheme();
@@ -187,7 +190,7 @@ void HudButton::SetQuery(Query::Ptr query)
{
nux::StaticCairoText* text = new nux::StaticCairoText(item.first.c_str());
text->SetTextColor(nux::Color(1.0f, 1.0f, 1.0f, item.second ? 1.0f : 0.5f));
- text->SetFont("Ubuntu 13"); // 17 px = 13
+ text->SetFont(button_font);
hlayout_->AddView(text, 0, nux::MINOR_POSITION_CENTER, nux::MINOR_SIZE_FULL);
}
}