~unity-team/unity/trusty-1332509

« back to all changes in this revision

Viewing changes to dash/FilterMultiRangeWidget.cpp

  • Committer: CI bot
  • Author(s): Stephen M. Webb, Marco Trevisan (Treviño), Andrea Azzarone, Pawel Szubert, Chris Townsend, Andrea Azzarone, Eleni Maria Stea
  • Date: 2014-08-26 13:48:28 UTC
  • mfrom: (3800.1.24 prepare-7.2.3-SRU)
  • Revision ID: ps-jenkins@lists.canonical.com-20140826134828-fkev1oisyfl9kbt3
Prepare fixes for upstream micro-release 7.2.3. Fixes: 1283415, 1292391, 1306211, 1312107, 1320051, 1320071, 1324114, 1339629, 1340171, 1340394, 1340477, 1340992, 1340996, 1342208, 1342731, 1347735

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
  mouse_up.connect(sigc::mem_fun(this, &FilterMultiRangeWidget::RecvMouseUp));
65
65
 
66
66
  mouse_drag.connect(sigc::mem_fun(this, &FilterMultiRangeWidget::RecvMouseDrag));
 
67
 
 
68
  scale.changed.connect([this] (double scale) {
 
69
    if (all_button_) all_button_->scale = scale;
 
70
 
 
71
    for (auto const& button : buttons_)
 
72
      button->scale = scale;
 
73
  });
67
74
}
68
75
 
69
76
void FilterMultiRangeWidget::SetFilter(Filter::Ptr const& filter)
83
90
    all_button_ = show_all_button ? new FilterAllButton(NUX_TRACKER_LOCATION) : nullptr;
84
91
    SetRightHandView(all_button_);
85
92
    if (all_button_)
 
93
    {
 
94
      all_button_->scale = scale();
86
95
      all_button_->SetFilter(filter_);
 
96
    }
87
97
  };
88
98
  show_button_func(filter_->show_all_button);
89
99
  filter_->show_all_button.changed.connect(show_button_func);
90
 
  
 
100
 
91
101
  expanded = !filter_->collapsed();
92
102
 
93
103
  filter_->option_added.connect(sigc::mem_fun(this, &FilterMultiRangeWidget::OnOptionAdded));
151
161
void FilterMultiRangeWidget::OnOptionAdded(FilterOption::Ptr const& new_filter)
152
162
{
153
163
  FilterMultiRangeButtonPtr button(new FilterMultiRangeButton(NUX_TRACKER_LOCATION));
 
164
  button->scale = scale();
154
165
  button->SetFilter(new_filter);
155
166
  layout_->AddView(button.GetPointer());
156
167
  buttons_.push_back(button);