~rsalveti/notify-osd/phablet-bump-epoch

« back to all changes in this revision

Viewing changes to src/notifications-view.cpp

  • Committer: Tarmac
  • Author(s): Mirco Müller
  • Date: 2013-02-01 15:14:45 UTC
  • mfrom: (652.1.4 notify-osd)
  • Revision ID: tarmac-20130201151445-d5401f3kkwufrtw9
Don't use pixel-values... adapt size and position automatically to screen-size/device, so one codebase works on both devices (phone/tablet).

Approved by Pete Woods, PS Jenkins bot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
 
38
38
#include <NuxGraphics/GLThread.h>
39
39
#include <NuxGraphics/RenderingPipe.h>
 
40
#include <NuxGraphics/GraphicsDisplay.h>
40
41
 
41
42
#include <glib.h>
42
43
 
90
91
  _accept_geo.height = 0;
91
92
  _units             = Units::getInstance ();
92
93
 
93
 
  nux::Geometry const& geo = GetGeometry();
 
94
  Units* units = Units::getInstance ();
 
95
  int gu = units->getGU ();
 
96
  nux::Geometry const& geo = {0, 0, nux::GetWindowThread()->GetGraphicsDisplay().GetScreenWidth(), 30 * gu};
 
97
  SetGeometry (geo);
 
98
 
94
99
  _canvas.reset (new nux::CairoWrapper (geo, sigc::mem_fun (this, &NotificationsView::DrawCallback)));
95
100
}
96
101