diff options
| author | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2014-03-11 00:32:46 +0100 |
|---|---|---|
| committer | Marco Trevisan (Treviño) <mail@3v1n0.net> | 2014-03-11 00:32:46 +0100 |
| commit | 6b81ba5340f26a9de8675dc14a67a5cb1333d88f (patch) | |
| tree | 3cfb829d88bae5cb3168838b58dab43546d92664 /shortcuts | |
| parent | 11337282626e4d84752735858db2b0bbab4fcab2 (diff) | |
ShortcutController: make the view closable on first run
(bzr r3702.5.3)
Diffstat (limited to 'shortcuts')
| -rw-r--r-- | shortcuts/ShortcutController.cpp | 5 | ||||
| -rw-r--r-- | shortcuts/ShortcutController.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/shortcuts/ShortcutController.cpp b/shortcuts/ShortcutController.cpp index da796d9ca..a2570888b 100644 --- a/shortcuts/ShortcutController.cpp +++ b/shortcuts/ShortcutController.cpp @@ -37,7 +37,8 @@ const unsigned int FADE_DURATION = 100; Controller::Controller(BaseWindowRaiser::Ptr const& base_window_raiser, AbstractModeller::Ptr const& modeller) - : modeller_(modeller) + : first_run(false) + , modeller_(modeller) , base_window_raiser_(base_window_raiser) , visible_(false) , enabled_(true) @@ -155,6 +156,7 @@ void Controller::ConstructView() AddChild(view_.GetPointer()); view_->SetModel(modeller_->GetCurrentModel()); view_->background_color = WindowManager::Default().average_color(); + view_->closable = first_run(); if (!view_window_) { @@ -197,6 +199,7 @@ void Controller::Hide() if (view_window_ && view_window_->GetOpacity() > 0.0f) { view_->live_background = false; + view_->closable = false; animation::StartOrReverse(fade_animator_, animation::Direction::BACKWARD); } } diff --git a/shortcuts/ShortcutController.h b/shortcuts/ShortcutController.h index c4a89c6f9..956fcb32b 100644 --- a/shortcuts/ShortcutController.h +++ b/shortcuts/ShortcutController.h @@ -47,6 +47,8 @@ public: Controller(BaseWindowRaiser::Ptr const& raiser, AbstractModeller::Ptr const& modeller); virtual ~Controller(); + nux::Property<bool> first_run; + bool Show(); void Hide(); |
