~azzar1/unity/damage-screen-when-animating

« back to all changes in this revision

Viewing changes to dash/DashView.cpp

  • Committer: Andrea Azzarone
  • Date: 2012-09-17 00:39:31 UTC
  • mto: This revision was merged to the branch mainline in revision 2712.
  • Revision ID: azzaronea@gmail.com-20120917003931-vsamvlcclqyim8pz
Use a nux::RWProperty for the form factor.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
  SetupViews();
99
99
  SetupUBusConnections();
100
100
 
101
 
  Settings::Instance().changed.connect(sigc::mem_fun(this, &DashView::Relayout));
 
101
  Settings::Instance().form_factor.changed.connect([this](FormFactor) {
 
102
    Relayout();
 
103
  });
 
104
 
102
105
  lenses_.lens_added.connect(sigc::mem_fun(this, &DashView::OnLensAdded));
103
106
  mouse_down.connect(sigc::mem_fun(this, &DashView::OnMouseButtonDown));
104
107
  preview_state_machine_.PreviewActivated.connect(sigc::mem_fun(this, &DashView::BuildPreview));
424
427
  dash::Style& style = dash::Style::Instance();
425
428
  nux::Geometry geo(content_geo_);
426
429
 
427
 
  if (Settings::Instance().GetFormFactor() == FormFactor::DESKTOP)
 
430
  if (Settings::Instance().form_factor() == FormFactor::DESKTOP)
428
431
  {
429
432
    geo.width += style.GetDashRightTileWidth();
430
433
    geo.height += style.GetDashBottomTileHeight();
856
859
 
857
860
  std::string form_factor("unknown");
858
861
 
859
 
  if (Settings::Instance().GetFormFactor() == FormFactor::NETBOOK)
 
862
  if (Settings::Instance().form_factor() == FormFactor::NETBOOK)
860
863
    form_factor = "netbook";
861
 
  else if (Settings::Instance().GetFormFactor() == FormFactor::DESKTOP)
 
864
  else if (Settings::Instance().form_factor() == FormFactor::DESKTOP)
862
865
    form_factor = "desktop";
863
 
  else if (Settings::Instance().GetFormFactor() == FormFactor::TV)
 
866
  else if (Settings::Instance().form_factor() == FormFactor::TV)
864
867
    form_factor = "tv";
865
868
 
866
869
  unity::variant::BuilderWrapper wrapper(builder);