~brandontschaefer/unity/move-window-buttons-unity-shared

« back to all changes in this revision

Viewing changes to shortcuts/ShortcutView.cpp

  • Committer: Tarmac
  • Author(s): Marco Trevisan (Treviño)
  • Date: 2013-01-23 10:36:37 UTC
  • mfrom: (2919.3.60 shortcut-WS-dynamic)
  • Revision ID: tarmac-20130123103637-jm981x8jre95g5v6
ShortcutModeller: added a modeller that generates the shortcuts models for both compiz and standalone view.

Approved by Andrea Azzarone.

Show diffs side-by-side

added added

removed removed

Lines of Context:
94
94
void View::SetModel(Model::Ptr model)
95
95
{
96
96
  model_ = model;
97
 
  model_->categories_per_column.changed.connect(sigc::hide(sigc::mem_fun(this, &View::RenderColumns)));
 
97
 
 
98
  if (model_)
 
99
    model_->categories_per_column.changed.connect(sigc::hide(sigc::mem_fun(this, &View::RenderColumns)));
98
100
 
99
101
  // Fills the columns...
100
102
  RenderColumns();
186
188
 
187
189
nux::Geometry View::GetBackgroundGeometry()
188
190
{
189
 
  nux::Geometry base = GetGeometry();
190
 
  nux::Geometry background_geo;
 
191
  nux::Geometry background_geo = GetGeometry();
191
192
 
192
 
  background_geo.width = base.width;
193
 
  background_geo.height = base.height;
194
 
  background_geo.x = (base.width - background_geo.width)/2;
195
 
  background_geo.y = (base.height - background_geo.height)/2;
 
193
  background_geo.x = 0;
 
194
  background_geo.y = 0;
196
195
 
197
196
  return background_geo;
198
197
}
206
205
{
207
206
  columns_layout_->Clear();
208
207
 
 
208
  if (!model_)
 
209
  {
 
210
    QueueRelayout();
 
211
    return;
 
212
  }
 
213
 
209
214
  int i = 0;
210
215
  int column_idx = 0;
211
216
  auto const& columns = columns_layout_->GetChildren();