From 0484534f30945d86c30612ceb71855bff301d90c Mon Sep 17 00:00:00 2001 From: Luke Yelavich Date: Wed, 25 Mar 2015 11:32:50 +1100 Subject: Implement scope bar icon accessibility (bzr r3929.10.1) --- dash/ScopeBar.cpp | 2 +- dash/ScopeBarIcon.cpp | 3 ++- dash/ScopeBarIcon.h | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'dash') diff --git a/dash/ScopeBar.cpp b/dash/ScopeBar.cpp index f7ed43189..027675c5a 100644 --- a/dash/ScopeBar.cpp +++ b/dash/ScopeBar.cpp @@ -85,7 +85,7 @@ void ScopeBar::SetupLayout() void ScopeBar::AddScope(Scope::Ptr const& scope) { - ScopeBarIcon* icon = new ScopeBarIcon(scope->id, scope->icon_hint); + ScopeBarIcon* icon = new ScopeBarIcon(scope->id, scope->icon_hint, scope->name); icon->SetVisible(scope->visible); icon->scale = scale(); diff --git a/dash/ScopeBarIcon.cpp b/dash/ScopeBarIcon.cpp index 165d691bf..f2146578b 100644 --- a/dash/ScopeBarIcon.cpp +++ b/dash/ScopeBarIcon.cpp @@ -37,9 +37,10 @@ double const DEFAULT_SCALE = 1.0; NUX_IMPLEMENT_OBJECT_TYPE(ScopeBarIcon); -ScopeBarIcon::ScopeBarIcon(std::string id_, std::string icon_hint) +ScopeBarIcon::ScopeBarIcon(std::string id_, std::string icon_hint, std::string name_) : IconTexture(icon_hint, TEXTURE_SIZE) , id(id_) + , name(name_) , active(false) , scale(DEFAULT_SCALE) , inactive_opacity_(0.4f) diff --git a/dash/ScopeBarIcon.h b/dash/ScopeBarIcon.h index a9825d168..4276b5534 100644 --- a/dash/ScopeBarIcon.h +++ b/dash/ScopeBarIcon.h @@ -37,9 +37,10 @@ class ScopeBarIcon : public IconTexture { NUX_DECLARE_OBJECT_TYPE(ScopeBarIcon, IconTexture); public: - ScopeBarIcon(std::string id, std::string icon_hint); + ScopeBarIcon(std::string id, std::string icon_hint, std::string name); nux::Property id; + nux::Property name; nux::Property active; nux::Property scale; -- cgit v1.2.3