summaryrefslogtreecommitdiff
path: root/launcher
diff options
authorMarco Trevisan (Treviño) <mail@3v1n0.net>2013-11-19 18:18:49 +0100
committerMarco Trevisan (Treviño) <mail@3v1n0.net>2013-11-19 18:18:49 +0100
commit86ddd82d186692a906bf2c3cca9397a82abca434 (patch)
treeaa8c0bff93489ba4e99c9e0518d8aaa09dae0ad4 /launcher
parent460805d99483f65d44b688e93f018aa4a7240b06 (diff)
SwitcherView: remove unneeded animate property
(bzr r3347.6.6)
Diffstat (limited to 'launcher')
-rw-r--r--launcher/SwitcherView.cpp13
-rw-r--r--launcher/SwitcherView.h1
2 files changed, 5 insertions, 9 deletions
diff --git a/launcher/SwitcherView.cpp b/launcher/SwitcherView.cpp
index c284a7ec6..881a90db0 100644
--- a/launcher/SwitcherView.cpp
+++ b/launcher/SwitcherView.cpp
@@ -93,10 +93,7 @@ SwitcherView::SwitcherView()
return geo;
});
- animation_.updated.connect([this] (double p) {
- PreLayoutManagement();
- QueueDraw();
- });
+ animation_.updated.connect(sigc::hide(sigc::mem_fun(this, &SwitcherView::PreLayoutManagement)));
}
std::string SwitcherView::GetName() const
@@ -200,7 +197,6 @@ void SwitcherView::SaveLast()
void SwitcherView::OnDetailSelectionIndexChanged(unsigned int index)
{
QueueRelayout();
- QueueDraw();
}
void SwitcherView::OnDetailSelectionChanged(bool detail)
@@ -699,8 +695,6 @@ std::list<RenderArg> SwitcherView::RenderArgsFlat(nux::Geometry& background_geo,
std::list<RenderArg> results;
nux::Geometry const& base = GetGeometry();
- bool detail_selection = model_->detail_selection;
-
background_geo.y = base.y + base.height / 2 - (vertical_size / 2);
background_geo.height = vertical_size;
@@ -709,6 +703,7 @@ std::list<RenderArg> SwitcherView::RenderArgsFlat(nux::Geometry& background_geo,
if (model_)
{
+ bool detail_selection = model_->detail_selection;
int size = model_->Size();
int padded_tile_size = tile_size + flat_spacing * 2;
int max_width = base.width - border_size * 2;
@@ -844,7 +839,7 @@ void SwitcherView::PreLayoutManagement()
double progress = animation_.GetCurrentValue();
nux::Geometry background_geo;
- last_args_ = RenderArgsFlat(background_geo, model_->SelectionIndex(), progress);
+ last_args_ = RenderArgsFlat(background_geo, model_ ? model_->SelectionIndex() : 0, progress);
if (background_geo != last_background_)
{
@@ -853,6 +848,8 @@ void SwitcherView::PreLayoutManagement()
// Notify BackgroundEffectHelper
geometry_changed.emit(this, last_background_);
}
+
+ QueueDraw();
}
void SwitcherView::PreDraw(nux::GraphicsEngine& GfxContext, bool force_draw)
diff --git a/launcher/SwitcherView.h b/launcher/SwitcherView.h
index 4ccd7359c..dca50a36a 100644
--- a/launcher/SwitcherView.h
+++ b/launcher/SwitcherView.h
@@ -57,7 +57,6 @@ public:
SwitcherModel::Ptr GetModel();
nux::Property<bool> render_boxes;
- nux::Property<bool> animate;
nux::Property<int> border_size;
nux::Property<int> flat_spacing;
nux::Property<int> icon_size;