*/}}
Ver Fonte

Ui layout minimum cleanup

YimingWu há 1 ano atrás
pai
commit
b5520aa8fc
1 ficheiros alterados com 8 adições e 8 exclusões
  1. 8 8
      la_kernel.c

+ 8 - 8
la_kernel.c

@@ -1562,7 +1562,7 @@ void laEnsurePanelInBound(laPanel *p, laUiList *uil){
     int PH = p->TH;
     laBoxedTheme*bt = *p->BT;
 
-    int uih=uil->B + bt->TM+bt->BM;
+    int uih=uil->B + bt->BM;
     if (p->BoundUi && !(p->SB||p->ST)) PH = TNS_MAX2(uih, p->MinH);
     if (p->MaxH && PH > p->MaxH) p->TH = p->MaxH;
     else if (p->MinH && PH < p->MinH) p->TH = p->MinH;
@@ -1585,7 +1585,7 @@ void laEnsurePanelInBound(laPanel *p, laUiList *uil){
         if (p->W > cw){ p->W = cw; } if (p->H > ch){ p->H = ch; }
     }
 
-    if(!p->IsMenuPanel){
+    if((!p->IsMenuPanel) && (p->Mode!=LA_PANEL_FLOATING_PASSIVE)){
         if(p->W<LA_RH*4) p->W=LA_RH*4;
         if(p->H<LA_RH*2) p->H=LA_RH*2;
     }
@@ -1756,10 +1756,10 @@ void la_PanelDrawDescendBorder(laPanel *Panel, laBoxedTheme *bt, int Width, real
     tnsPackAs(GL_TRIANGLE_STRIP);
 
     tnsColor4dv(laThemeColor(bt,LA_BT_BORDER));
-    tnsVertex2d(Panel->X, Panel->Y);
-    tnsVertex2d(Panel->X, Panel->Y + Panel->H);
-    tnsVertex2d(Panel->X + Panel->W, Panel->Y + Panel->H);
-    tnsVertex2d(Panel->X + Panel->W, Panel->Y);
+    tnsVertex2d(Panel->X-1, Panel->Y-1);
+    tnsVertex2d(Panel->X-1, Panel->Y + Panel->H+1);
+    tnsVertex2d(Panel->X+1 + Panel->W, Panel->Y + Panel->H+1);
+    tnsVertex2d(Panel->X+1 + Panel->W, Panel->Y-1);
     tnsPackAs(GL_LINE_LOOP);
 }
 
@@ -1855,7 +1855,7 @@ void la_PanelDefDraw(laWindow *w, laPanel *p, laBoxedTheme *bt){
             if (!p->IsMenuPanel){
                 la_PanelDrawDescendBorder(p, bt, MAIN.SolidShadowLength, MAIN.FloatingAlpha);
             }
-            tnsFlush();
+            glLineWidth(2.0); tnsFlush(); glLineWidth(1.0);
         }
 
         la_PanelDrawToWindow(p, w);
@@ -4677,7 +4677,7 @@ int la_InitRowNode(laRowInfo* ri, laUiItem* ui, laBoxedTheme* bt){
 void la_AddRowNode(laRowInfo* ri, laUiItem* ui, laBoxedTheme* bt, int H){
     laRowNode* rn=CreateNew(laRowNode);
     rn->LP=bt->LP;rn->RP=bt->RP;
-    rn->GotW = (ui->Type->GetMinWidth?ui->Type->GetMinWidth(ui):(LA_RH)) +bt->LM+bt->RM;
+    rn->GotW = (ui->Type->GetMinWidth?ui->Type->GetMinWidth(ui):(LA_RH)) ;
     rn->ui=ui;
     rn->H=H;
     rn->Expand=ui->Expand;