~nicovdw/unity/fix-for-733743

« back to all changes in this revision

Viewing changes to src/PlacesController.cpp

  • Committer: Gord Allott
  • Date: 2011-03-08 09:27:11 UTC
  • mfrom: (917.3.2 unity)
  • Revision ID: gord.allott@canonical.com-20110308092711-5odf3752n0yiw7cs
Merging in a variable launcher size branch from Andrea Azzarone that fixes wishlist bug lp:713087

Show diffs side-by-side

added added

removed removed

Lines of Context:
32
32
 
33
33
#include "PlacesController.h"
34
34
 
 
35
int PlacesController::_launcher_size = 66;
 
36
 
35
37
PlacesController::PlacesController ()
36
38
: _visible (false),
37
39
  _fullscren_request (false)
156
158
  }
157
159
  else
158
160
  {
159
 
    width = rect.width - 66;
 
161
    width = rect.width - _launcher_size;
160
162
    height = rect.height - 24;
161
163
 
162
164
    _view->SetSizeMode (PlacesView::SIZE_MODE_FULLSCREEN);
173
175
{
174
176
  int width = 0, height = 0;
175
177
  static_cast<PlacesController *> (user_data)->GetWindowSize (&width, &height);
176
 
  geo = nux::Geometry (66, 24, width, height);
 
178
  geo = nux::Geometry (_launcher_size, 24, width, height);
177
179
}
178
180
 
179
181
void
182
184
  int width = 0, height = 0;
183
185
  _fullscren_request = true;
184
186
  GetWindowSize (&width, &height);
185
 
  _window->SetGeometry (nux::Geometry (66, 24, width, height));
 
187
  _window->SetGeometry (nux::Geometry (_launcher_size, 24, width, height));
186
188
}
187
189
 
188
190
void
203
205
PlacesController::RecvMouseDownOutsideOfView  (int x, int y, unsigned long button_flags, unsigned long key_flags)
204
206
{
205
207
  //FIXME: We need a way to get the real position/size of the homebutton
206
 
  nux::Geometry geo (0, 0, 66, 24);
 
208
  nux::Geometry geo (0, 0, _launcher_size, 24);
207
209
  if (!geo.IsPointInside (x, y))
208
210
    Hide ();
209
211
}
214
216
  entry ? Show () : Hide ();
215
217
}
216
218
 
 
219
void
 
220
PlacesController::SetLauncherSize (int launcher_size)
 
221
{
 
222
    _launcher_size = launcher_size;
 
223
}
 
224
 
217
225
 
218
226
/* Introspection */
219
227
const gchar *