comparison Framework/Widgets/LayoutWidget.cpp @ 527:b1377625e4ba bgo-commands-codegen

Removed ICommand and friends + fixed warnings + added missing header files in solution (in CMakeLists.txt file)
author Benjamin Golinvaux <bgo@osimis.io>
date Sun, 17 Mar 2019 20:14:20 +0100
parents 3b4df9925db6
children 4f2416d519b4
comparison
equal deleted inserted replaced
522:700aa66f2f29 527:b1377625e4ba
72 const std::vector<Touch>& displayTouches) 72 const std::vector<Touch>& displayTouches)
73 { 73 {
74 std::vector<Touch> relativeTouches; 74 std::vector<Touch> relativeTouches;
75 for (size_t t = 0; t < displayTouches.size(); t++) 75 for (size_t t = 0; t < displayTouches.size(); t++)
76 { 76 {
77 relativeTouches.push_back(Touch((int)displayTouches[t].x - left_, (int)displayTouches[t].y - top_)); 77 relativeTouches.push_back(Touch(displayTouches[t].x - left_, displayTouches[t].y - top_));
78 } 78 }
79 79
80 tracker_->MouseMove(x - left_, y - top_, relativeTouches); 80 tracker_->MouseMove(x - left_, y - top_, relativeTouches);
81 } 81 }
82 }; 82 };
224 children_[i]->SetEmpty(); 224 children_[i]->SetEmpty();
225 } 225 }
226 } 226 }
227 else if (isHorizontal_) 227 else if (isHorizontal_)
228 { 228 {
229 unsigned int padding = paddingLeft_ + paddingRight_ + (children_.size() - 1) * paddingInternal_; 229 unsigned int padding = paddingLeft_ + paddingRight_ + (static_cast<unsigned int>(children_.size()) - 1) * paddingInternal_;
230 float childWidth = ((static_cast<float>(width_) - static_cast<float>(padding)) / 230 float childWidth = ((static_cast<float>(width_) - static_cast<float>(padding)) /
231 static_cast<float>(children_.size())); 231 static_cast<float>(children_.size()));
232 232
233 for (size_t i = 0; i < children_.size(); i++) 233 for (size_t i = 0; i < children_.size(); i++)
234 { 234 {
248 } 248 }
249 } 249 }
250 } 250 }
251 else 251 else
252 { 252 {
253 unsigned int padding = paddingTop_ + paddingBottom_ + (children_.size() - 1) * paddingInternal_; 253 unsigned int padding = paddingTop_ + paddingBottom_ + (static_cast<unsigned int>(children_.size()) - 1) * paddingInternal_;
254 float childHeight = ((static_cast<float>(height_) - static_cast<float>(padding)) / 254 float childHeight = ((static_cast<float>(height_) - static_cast<float>(padding)) /
255 static_cast<float>(children_.size())); 255 static_cast<float>(children_.size()));
256 256
257 for (size_t i = 0; i < children_.size(); i++) 257 for (size_t i = 0; i < children_.size(); i++)
258 { 258 {