~azzar1/unity/fix-868452-825037

« back to all changes in this revision

Viewing changes to src/PlacesGroupController.cpp

Show the right expand button hint

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
PlacesGroupController::PlacesGroupController (PlaceEntryGroup& group)
27
27
: _group (NULL)
28
28
{
 
29
#define ROW_HEIGHT 100
 
30
 
29
31
  PlacesSettings *settings = PlacesSettings::GetDefault ();
30
32
 
31
33
  _id = group.GetId ();
33
35
  _group = new PlacesGroup (NUX_TRACKER_LOCATION);
34
36
  _group->SetName(group.GetName ());
35
37
  _group->SetIcon (group.GetIcon ());
 
38
  _group->SetChildUnexpandHeight (ROW_HEIGHT);
36
39
 
37
40
  nux::GridHLayout *layout = new nux::GridHLayout (NUX_TRACKER_LOCATION);
38
41
  layout->ForceChildrenSize (true);
39
 
  layout->SetChildrenSize (settings->GetDefaultTileWidth (), 100);
 
42
  layout->SetChildrenSize (settings->GetDefaultTileWidth (), ROW_HEIGHT);
40
43
  layout->EnablePartialVisibility (false);
41
44
 
42
45
  layout->SetVerticalExternalMargin (4);
84
87
  _group->GetChildLayout ()->AddView (tile);
85
88
  _group->Relayout ();
86
89
  _group->SetVisible (true);
 
90
  _group->SetCounts (6, _id_to_tile.size ());
87
91
 
88
92
  g_free (result_name);
89
93
}
103
107
  _group->GetChildLayout ()->RemoveChildObject (tile);
104
108
  _group->SetVisible (_id_to_tile.size ());
105
109
  _group->Relayout ();
 
110
 
 
111
  _id_to_tile.erase (result.GetId ());
 
112
  _group->SetCounts (6, _id_to_tile.size ());
106
113
}
107
114
 
108
115
void