*/}}
Browse Source

Better looking UDF manager

YimingWu 1 year ago
parent
commit
53d979188a
1 changed files with 16 additions and 9 deletions
  1. 16 9
      resources/la_templates.c

+ 16 - 9
resources/la_templates.c

@@ -997,7 +997,7 @@ void laui_ManagedPropInstance(laUiList *uil, laPropPack *Base, laPropPack *Opera
     if(!Base ||! Base->EndInstance ||Base->LastPs->p->PropertyType!=LA_PROP_SUB) return;
     laColumn *c=laFirstColumn(uil);
     laSplitColumn(uil,c,0.3); laColumn *cl=laLeftColumn(c, 1); laColumn *cr=laRightColumn(c,0);
-    laSplitColumn(uil,cr,0.6); laColumn *crl=laLeftColumn(cr, 0); laColumn *crr=laRightColumn(cr,30);
+    laSplitColumn(uil,cr,0.6); laColumn *crl=laLeftColumn(cr, 0); laColumn *crr=laRightColumn(cr,20);
 
     laPropContainer* pc=la_EnsureSubTarget(Base->LastPs->p, Base->EndInstance);
 
@@ -1005,14 +1005,14 @@ void laui_ManagedPropInstance(laUiList *uil, laPropPack *Base, laPropPack *Opera
         char buf[128]; sprintf(buf,"Assign all \"%s\" into:",pc->Name);
         laShowLabel(uil,crl,buf,0,0)->Flags|=LA_TEXT_ALIGN_RIGHT|LA_UI_FLAGS_DISABLED;
         laShowItem(uil,crr,Base,"__single_udf_propagate");
-        laShowSeparator(uil,c);
+        laShowLabel(uil,cl," ",0,0);
     }
     
     if(pc->OtherAlloc || Base->LastPs->p->UDFIsSingle){
         //laShowLabel(uil,cr,"(Item not allocated by memAcquire)",0,0)->Expand=1;
     }else{
         if(pc->Hyper==2){
-            laShowItem(uil,cl,Base,"__modified"); laSplitColumn(uil,crl,0.4); laColumn *crll=laLeftColumn(crl, 0); laColumn *crlr=laRightColumn(crl,15);
+            laShowItem(uil,cl,Base,"__modified"); laSplitColumn(uil,crl,0.4); laColumn *crll=laLeftColumn(crl, 0); laColumn *crlr=laRightColumn(crl,20);
             laUiItem* idui=laShowItem(uil,crll,Base,"identifier");idui->Flags|=LA_UI_FLAGS_PLAIN;idui->Expand=1;
             laShowItem(uil,crlr,Base,"__uid")->Flags|=LA_UI_FLAGS_NO_DECAL;
             if(pc->UDFPropagate){
@@ -1045,22 +1045,29 @@ void laui_ManagedPropInstance(laUiList *uil, laPropPack *Base, laPropPack *Opera
             laShowItem(uil,crr,Base,"__single_saver_dummy.__file");
             continue;
         }
-        laUiItem* b=laOnConditionToggle(uil,c,0,0,0,0,0);{ strSafePrint(&b->ExtraInstructions,"text= %s;",p->Identifier);
+        laUiItem* b=laOnConditionToggle(uil,c,0,0,0,0,0);{ strSafePrint(&b->ExtraInstructions,"text=📦 %s;",p->Identifier);
             b->Flags|=LA_UI_FLAGS_NO_DECAL|LA_TEXT_ALIGN_LEFT; b->State=LA_BT_ACTIVE;
             laShowItemFull(uil,cr,Base,p->Identifier,0, 0,laui_ManagedPropInstance,0)->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_COLLECTION_NO_HIGHLIGHT;
         }laEndCondition(uil,b);
     }
-
-    laShowSeparator(uil,c);
+    if(pc->UDFPropagate){
+        laShowSeparator(uil,c);
+    }
 }
 void laui_ManagedProp(laUiList *uil, laPropPack *Base, laPropPack *OperatorInst, laColumn *ExtraColumns, int context){
-    laColumn *c=laFirstColumn(uil);
+    laColumn *c=laFirstColumn(uil),*cl,*cr,*cll,*clr;
     laPropPack PP={0}; if(!Base ||! Base->EndInstance) return;
-
     laManagedSaveProp* msp=Base->EndInstance;
+    laSplitColumn(uil,c,0.6); cl=laLeftColumn(c,0); cr=laRightColumn(c,20);
+    laSplitColumn(uil,cl,0.7); cll=laLeftColumn(cl,0); clr=laRightColumn(cl,0);
 
-    laShowLabel(uil,c,msp->Path->Ptr,0,0);
+    laShowLabel(uil,cll,msp->Path->Ptr,0,0);
+    
+    laShowLabel(uil,clr,"UID",0,0)->Flags|=LA_UI_FLAGS_DISABLED|LA_TEXT_ALIGN_CENTER;
+    laShowLabel(uil,cr,"File",0,0)->Flags|=LA_UI_FLAGS_DISABLED|LA_TEXT_ALIGN_CENTER;
     laShowItemFull(uil,c,0,msp->Path->Ptr,0, 0,laui_ManagedPropInstance,0)->Flags|=LA_UI_FLAGS_NO_DECAL|LA_UI_COLLECTION_NO_HIGHLIGHT;
+
+    laShowSeparator(uil,c);
 }
 void laui_ManagedSavePanel(laUiList *uil, laPropPack *Base, laPropPack *Operator, laColumn *ExtraColumns, int context){
     laManagedSaveExtra*mse=Operator->EndInstance;