diff options
| author | Luke Yelavich <luke.yelavich@canonical.com> | 2015-03-25 11:32:50 +1100 |
|---|---|---|
| committer | Luke Yelavich <luke.yelavich@canonical.com> | 2015-03-25 11:32:50 +1100 |
| commit | 0484534f30945d86c30612ceb71855bff301d90c (patch) | |
| tree | a29c657f936c9ce7ed9968eabab77d4329fe04a5 /dash | |
| parent | dddcdb996f09ea4c5b072df9d453d92d7fef28e9 (diff) | |
Implement scope bar icon accessibility
(bzr r3929.10.1)
Diffstat (limited to 'dash')
| -rw-r--r-- | dash/ScopeBar.cpp | 2 | ||||
| -rw-r--r-- | dash/ScopeBarIcon.cpp | 3 | ||||
| -rw-r--r-- | dash/ScopeBarIcon.h | 3 |
3 files changed, 5 insertions, 3 deletions
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<std::string> id; + nux::Property<std::string> name; nux::Property<bool> active; nux::Property<double> scale; |
