~nux-team/nux/nux.attempt-to-fix-widgets

« back to all changes in this revision

Viewing changes to Nux/VLayout.cpp

merged with nux trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
245
245
      VLayoutManagement(width, height);
246
246
 
247
247
      // Objects have been resized, now position them.
248
 
      int current_x = GetBaseX() + left_padding_;
249
 
      int current_y = GetBaseY() + top_padding_;
 
248
      int current_x = left_padding_;
 
249
      int current_y = top_padding_;
250
250
 
251
251
      //int per_element_space = 0;
252
252
      //int total_used_space = 0;
364
364
          continue;
365
365
 
366
366
        int ret = 0;
367
 
        
 
367
 
368
368
        if (((*it)->IsLayout() || (*it)->IsView()) /*&& ((*it)->IsLayoutDone() == false)*/ /*&& ((*it)->GetScaleFactor() != 0)*/)
369
369
        {
370
 
          Geometry pre_geo = (*it)->GetGeometry();
 
370
          Geometry pre_geo = (*it)->GetNativeGeometry();
371
371
          ret = (*it)->ComputeContentSize();
372
 
          Geometry post_geo = (*it)->GetGeometry();
 
372
          Geometry post_geo = (*it)->GetNativeGeometry();
373
373
 
374
374
          bool larger_width    = pre_geo.width < post_geo.width;
375
375
          bool smaller_width   = pre_geo.width > post_geo.width;
563
563
      {
564
564
        if (!(*it)->IsVisible())
565
565
          continue;
566
 
        
 
566
 
567
567
        if ((*it)->GetScaleFactor() == 0 || (*it)->IsLayoutDone() == true)
568
568
        {
569
569
          available_height -= (*it)->GetBaseHeight();
610
610
      {
611
611
        if (!(*it)->IsVisible())
612
612
          continue;
613
 
       
 
613
 
614
614
        if (((*it)->GetScaleFactor() != 0) && ((*it)->IsLayoutDone() == false))
615
615
        {
616
616
          float sf = (float) (*it)->GetScaleFactor();
772
772
      height -= (int) (num_element - 1) * space_between_children_ + (top_padding_ + bottom_padding_);
773
773
 
774
774
      // Objects have been resized, now position them.
775
 
      int current_x = GetBaseX() + left_padding_ + offsetX; // add base offset in X(used for scrolling)
776
 
      int current_y = GetBaseY() + top_padding_ + offsetY; // add base offset in Y(used for scrolling)
 
775
      int current_x = left_padding_ + offsetX; // add base offset in X(used for scrolling)
 
776
      int current_y = top_padding_ + offsetY; // add base offset in Y(used for scrolling)
777
777
 
778
778
      int offset_space = 0;
779
779
      int element_margin = 0;