*/}}
1
0
Преглед на файлове

Fix auto bottom alignment

YimingWu преди 1 година
родител
ревизия
06d5774341
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      la_kernel.c

+ 2 - 2
la_kernel.c

@@ -5350,7 +5350,7 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
             if (ui->Type != _LA_UI_COLLECTION && (ui->Subs.pFirst || ui->Page) && ui->Type != _LA_UI_MENU_ROOT){
                 if (ui->Type != _LA_UI_CANVAS){
                     int scrollw=ui->Page->ScrollerShownV?bt->RP*2+LA_SCROLL_W:0;
-                    la_CalcUiTopInfluence(&uil->Columns, ui); int first_in=(ui->Page->B==0);
+                    la_CalcUiTopInfluence(&uil->Columns, ui); int first_in=((ui->Flags&LA_UI_FLAGS_PREFER_BOTTOM) && ui->Page->B==0);
                     SubB = la_UpdateUiListRecursive(ui->Page,
                         ui->TB + (ui->State == LA_UI_ACTIVE ? 0 : LA_RH)+(NoDecal?0:bt->TM), ui->TL+(NoDecal?0:bt->LM), ui->TR-(NoDecal?0:bt->RM)-scrollw, B, Fast, ParentPanel);
                     ui->TB = (ui->Page->HeightCoeff > 0 ? ui->TU + ui->Page->HeightCoeff * LA_RH :
@@ -5362,7 +5362,7 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
                     }
                     if(ui->Page->AllowScale){ui->Page->ScrollerShownH=1;}
                     if(ui->Page->ScrollerShownH){subh-=LA_SCROLL_W-bt->BM;}
-                    if((GB && ui->TB >= GB)||first_in){ ui->Page->PanY=(SubB-ui->TB-bt->BM); if(ui->Page->PanY<0)ui->Page->PanY=0; }
+                    if((GB && ui->TB >= GB)||first_in){ printf("a\n"); ui->Page->PanY=(SubB-ui->TB-bt->BM); if(ui->Page->PanY<0)ui->Page->PanY=0; }
                     if(ui->Page->HeightCoeff){
                         if((subh<ui->Page->TB-ui->Page->TU && (!ui->Page->ScrollerShownV)) ||
                             (subh>=ui->Page->TB-ui->Page->TU && ui->Page->ScrollerShownV)){