|
@@ -1332,7 +1332,7 @@ int laGetReadyWith(laInitArguments* ia){
|
|
|
if((!dpi) || dpi<144){ dpi=144; } if(dpi>300){ dpi=300; }
|
|
|
int UiSize=(int)(tnsLinearItp(16.0f,24.0f,tnsGetRatiod(96,144,dpi))+0.5);
|
|
|
|
|
|
- MAIN.UiRowHeight = MAIN.ScaledUiRowHeight =UiSize;
|
|
|
+ MAIN.UiRowHeight = MAIN.ScaledUiRowHeight = UiSize;
|
|
|
MAIN.UiScale=1;
|
|
|
MAIN.MarginSize = 1;
|
|
|
|
|
@@ -1916,7 +1916,7 @@ void la_UpdateUiPlacement(laWindow *w){
|
|
|
int CW = w->CW;
|
|
|
int CH = w->CH;
|
|
|
laBoxedTheme* bt = _LA_THEME_FLOATING_PANEL;
|
|
|
- int MenuHeight=(bt->TM+bt->BM)*2+LA_RH;
|
|
|
+ int MenuHeight=(LA_M+LA_M)*2+LA_RH;
|
|
|
|
|
|
if(w->MaximizedUi && w->MaximizedUiPanel){
|
|
|
laRecalcPanel(w->MaximizedUiPanel);
|
|
@@ -2210,17 +2210,13 @@ laTheme *laDesignTheme(const char *Name, const char *AuthorName){
|
|
|
return t;
|
|
|
}
|
|
|
laBoxedTheme *laDesignBoxedTheme(laTheme *t, const char *Name, laBoxedTheme** BackRef,
|
|
|
- real NormalY,real ActiveY,real BorderY,real TextY,real TextActiveY, real Alpha,
|
|
|
- real LeftMargin, real RightMargin, real TopMargin, real BottomMargin,
|
|
|
- real LeftPadding, real RightPadding, real TopPadding, real BottomPadding){
|
|
|
+ real NormalY,real ActiveY,real BorderY,real TextY,real TextActiveY, real Alpha){
|
|
|
laBoxedTheme *bt = memAcquire(sizeof(laBoxedTheme));
|
|
|
strSafeSet(&bt->Name, Name);
|
|
|
bt->NormalY=NormalY;
|
|
|
bt->ActiveY=ActiveY;
|
|
|
bt->BorderY=BorderY;
|
|
|
bt->TextY=TextY; bt->TextActiveY=TextActiveY; bt->Alpha = Alpha;
|
|
|
- bt->Margins[0] = LeftMargin; bt->Margins[1] = RightMargin; bt->Margins[2] = TopMargin; bt->Margins[3] = BottomMargin;
|
|
|
- bt->Paddings[0] = LeftPadding; bt->Paddings[1] = RightPadding; bt->Paddings[2] = TopPadding; bt->Paddings[3] = BottomPadding;
|
|
|
bt->BackRef = BackRef;
|
|
|
lstAppendItem(&t->BoxedThemes, bt);
|
|
|
return bt;
|
|
@@ -2282,11 +2278,6 @@ void la_RefreshBoxedThemeColor(laBoxedTheme* bt){
|
|
|
hcy[2]=bt->BorderY; tnsHCY2RGB(hcy, bt->Border); bt->Border[3]=1;
|
|
|
hcy[2]=bt->TextY; tnsHCY2RGB(hcy, bt->Text); bt->Text[3]=1;
|
|
|
hcy[2]=bt->TextActiveY; tnsHCY2RGB(hcy, bt->TextActive); bt->TextActive[3]=1;
|
|
|
- int *tm=&bt->LM,*tp=&bt->LP;
|
|
|
- for(int i=0;i<4;i++){
|
|
|
- tm[i]=(real)bt->Margins[i]*LA_RH*MAIN.MarginSize/10+0.5;
|
|
|
- tp[i]=(real)bt->Paddings[i]*LA_RH*MAIN.MarginSize/10+0.5;
|
|
|
- }
|
|
|
}
|
|
|
void la_RefreshThemeColorSelf(laTheme* th){
|
|
|
tnsVectorCopy3d(th->AccentColor, th->CursorColor); th->CursorColor[3]=th->CursorAlpha;
|
|
@@ -2532,7 +2523,7 @@ void laEnsurePanelInBound(laPanel *p, laUiList *uil){
|
|
|
int PH = p->TH;
|
|
|
laBoxedTheme*bt = *p->BT;
|
|
|
|
|
|
- int uih=uil->B + bt->BM;
|
|
|
+ int uih=uil->B + LA_M;
|
|
|
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;
|
|
@@ -2804,7 +2795,7 @@ void la_PanelDefDraw(laWindow *w, laPanel *p, laBoxedTheme *bt){
|
|
|
la_SetupUiListLimitMatrix(&uild, 0, p->W, 0, p->H, p->H);
|
|
|
la_PanelBackgroundInit(p, bt);
|
|
|
int extrap=(p->Mode && (!p->IsMenuPanel))?p->TitleBar.B:0;
|
|
|
- la_DrawUiListScrollerV(&p->UI, p->UI.PanY, p->UI.B-p->UI.U, p->H-bt->BM-bt->TM-extrap, p->W);
|
|
|
+ la_DrawUiListScrollerV(&p->UI, p->UI.PanY, p->UI.B-p->UI.U, p->H-LA_M*2-extrap, p->W);
|
|
|
tnsFlush();
|
|
|
|
|
|
if(((p->UI.B>p->H) && (!p->UI.ScrollerShownV))||
|
|
@@ -2812,7 +2803,7 @@ void la_PanelDefDraw(laWindow *w, laPanel *p, laBoxedTheme *bt){
|
|
|
p->UI.ScrollerShownV=!p->UI.ScrollerShownV;
|
|
|
DrawState_++;
|
|
|
}
|
|
|
- if(p->UI.PanY && p->UI.B-p->UI.PanY<p->H-bt->BM ){
|
|
|
+ if(p->UI.PanY && p->UI.B-p->UI.PanY<p->H-LA_M){
|
|
|
p->UI.PanY = (p->UI.B-p->H/*-bt->BM-bt->TM*/-p->TitleBar.B);
|
|
|
if(p->UI.PanY<0){p->UI.PanY=0;}
|
|
|
DrawState_++;
|
|
@@ -2830,7 +2821,7 @@ void la_PanelDefDraw(laWindow *w, laPanel *p, laBoxedTheme *bt){
|
|
|
}else{
|
|
|
tnsViewportWithScissor(0,0,p->W,p->H); tnsOrtho(0,p->W,p->H,0,-100,100);
|
|
|
tnsDrawStringAutoM("Canvas is maximized",0,laThemeColor(bt,LA_BT_TEXT),
|
|
|
- bt->LM,p->W-bt->RM,(p->H - p->TitleBar.B)/2+LA_RH2,LA_TEXT_ALIGN_CENTER|LA_TEXT_LINE_WRAP);
|
|
|
+ LA_M,p->W-LA_M,(p->H - p->TitleBar.B)/2+LA_RH2,LA_TEXT_ALIGN_CENTER|LA_TEXT_LINE_WRAP);
|
|
|
tnsFlush();
|
|
|
}
|
|
|
if (DrawState_){ p->Refresh = LA_TAG_RECALC; laRefreshWindow(); }
|
|
@@ -2841,16 +2832,16 @@ void la_PanelDefDraw(laWindow *w, laPanel *p, laBoxedTheme *bt){
|
|
|
la_SetupUiListLimitMatrix(&uild, 0, p->W, 0, p->H, p->H);
|
|
|
la_PanelBackgroundInit(p, bt);
|
|
|
la_DrawUiListScrollerV(p->MenuRefer, p->MenuRefer->PanY,
|
|
|
- p->MenuRefer->B-p->MenuRefer->U-bt->TM-bt->BM, p->H-bt->TM-bt->BM*2, p->W);
|
|
|
+ p->MenuRefer->B-p->MenuRefer->U-LA_M*2, p->H-LA_M*3, p->W);
|
|
|
tnsFlush();
|
|
|
|
|
|
- if(((p->MenuRefer->TB>p->H-bt->BP) && (!p->MenuRefer->ScrollerShownV))||
|
|
|
- ((p->MenuRefer->TB<=p->H-bt->BP) && p->MenuRefer->ScrollerShownV)){
|
|
|
+ if(((p->MenuRefer->TB>p->H-LA_M) && (!p->MenuRefer->ScrollerShownV))||
|
|
|
+ ((p->MenuRefer->TB<=p->H-LA_M) && p->MenuRefer->ScrollerShownV)){
|
|
|
p->MenuRefer->ScrollerShownV=!p->MenuRefer->ScrollerShownV;
|
|
|
DrawState_++;
|
|
|
}
|
|
|
- if(p->UI.PanY && p->MenuRefer->B-p->MenuRefer->PanY<p->H-bt->BM){
|
|
|
- p->MenuRefer->PanY = (p->MenuRefer->B-p->H-bt->BM);
|
|
|
+ if(p->UI.PanY && p->MenuRefer->B-p->MenuRefer->PanY<p->H-LA_M){
|
|
|
+ p->MenuRefer->PanY = (p->MenuRefer->B-p->H-LA_M);
|
|
|
if(p->MenuRefer->PanY<0){p->MenuRefer->PanY=0;}
|
|
|
DrawState_++;
|
|
|
}
|
|
@@ -3121,7 +3112,7 @@ void la_BlockDefDrawRecursive(laWindow *w, laBoxedTheme *bt, laBlock *b){
|
|
|
laLayout* l=MAIN.CurrentWindow->CurrentLayout;
|
|
|
if(b==l->HeaderBlock){
|
|
|
tnsUseNoTexture(); real tv[8]; int YOffset=0;
|
|
|
- laBoxedTheme* bt = _LA_THEME_FLOATING_PANEL; int MenuHeight=(bt->TM+bt->BM)*2+LA_RH;
|
|
|
+ laBoxedTheme* bt = _LA_THEME_FLOATING_PANEL; int MenuHeight=(LA_M+LA_M)*2+LA_RH;
|
|
|
if(b->Y<MenuHeight+LA_SEAM_W){ YOffset=LA_SEAM_W; }
|
|
|
tnsMakeQuad2d(tv, b->X, (w->CH-(b->Y-LA_SEAM_W))-YOffset,
|
|
|
b->X+b->W, (w->CH-(b->Y-LA_SEAM_W))-YOffset,
|
|
@@ -3132,7 +3123,7 @@ void la_BlockDefDrawRecursive(laWindow *w, laBoxedTheme *bt, laBlock *b){
|
|
|
tnsPackAs(GL_TRIANGLE_FAN);
|
|
|
if(l->IsBlockHeaderClicked && (!l->IsMoving)){
|
|
|
char* Hint=transLate("Double-click to expand 🖱");
|
|
|
- int Width = tnsStringGetWidth(Hint,0,0)+bt->LM+bt->RM;
|
|
|
+ int Width = tnsStringGetWidth(Hint,0,0)+LA_M*2;
|
|
|
int UseL=l->LastX-Width-LA_RH; UseL=TNS_MAX2(UseL,b->X);
|
|
|
tnsMakeQuad2d(tv, UseL, w->CH-b->Y,
|
|
|
UseL+Width, w->CH-b->Y,
|
|
@@ -3141,7 +3132,7 @@ void la_BlockDefDrawRecursive(laWindow *w, laBoxedTheme *bt, laBlock *b){
|
|
|
tnsColor4dv(laThemeColor(_LA_THEME_TAB,LA_BT_BORDER));
|
|
|
tnsVertexArray2d(tv, 4);
|
|
|
tnsPackAs(GL_TRIANGLE_FAN);
|
|
|
- tnsDrawStringAuto(Hint,laThemeColor(_LA_THEME_TAB,LA_BT_TEXT_ACTIVE),UseL+bt->LM,UseL+Width,w->CH-b->Y,LA_TEXT_REVERT_Y);
|
|
|
+ tnsDrawStringAuto(Hint,laThemeColor(_LA_THEME_TAB,LA_BT_TEXT_ACTIVE),UseL+LA_M,UseL+Width,w->CH-b->Y,LA_TEXT_REVERT_Y);
|
|
|
}
|
|
|
}elif(b==l->MovingBlock){
|
|
|
tnsUseNoTexture();
|
|
@@ -3934,20 +3925,20 @@ int laEnclosePanelContent(laPanel *p, laUiList *uil){
|
|
|
if(p->SL && p->SR){return 0;}
|
|
|
la_SetPropMathcerContext(p);
|
|
|
|
|
|
- la_UpdateUiListRecursive(&p->TitleBar, bt->TM, bt->LM, p->TW - bt->LM-bt->RM, p->TH, 0, p);
|
|
|
- la_UpdateUiListRecursive(uil, bt->TM+p->TitleBar.B, 0, 1000, 0, 0, p);
|
|
|
+ la_UpdateUiListRecursive(&p->TitleBar, LA_M, LA_M, p->TW - LA_M*2, p->TH, 0, p);
|
|
|
+ la_UpdateUiListRecursive(uil, LA_M+p->TitleBar.B, 0, 1000, 0, 0, p);
|
|
|
MinWt = la_TestUiListMinumWidth(&p->TitleBar);
|
|
|
MinW = la_TestUiListMinumWidth(uil);
|
|
|
if (MinW<MinWt){MinW=MinWt;}
|
|
|
- int ScrollerW=(uil->ScrollerShownV?(LA_SCROLL_W+bt->RM):0);
|
|
|
+ int ScrollerW=(uil->ScrollerShownV?(LA_SCROLL_W+LA_M):0);
|
|
|
if (MinW > 20){
|
|
|
- p->TW = MinW + bt->LM + bt->RM+ScrollerW;
|
|
|
+ p->TW = MinW + LA_M*2 +ScrollerW;
|
|
|
}
|
|
|
la_PanelValidateWidth(p,uil);
|
|
|
laEnsurePanelInBound(p,uil);
|
|
|
if(p->TW>CW){ p->TW=CW; }
|
|
|
- la_UpdateUiListRecursive(&p->TitleBar, bt->TM, bt->LM, p->TW - bt->LM-bt->RM, p->TH, 0, p);
|
|
|
- la_UpdateUiListRecursive(uil, bt->TM+p->TitleBar.B, bt->LM, p->TW - bt->RM - ScrollerW, 0, 0, p);
|
|
|
+ la_UpdateUiListRecursive(&p->TitleBar, LA_M, LA_M, p->TW - LA_M*2, p->TH, 0, p);
|
|
|
+ la_UpdateUiListRecursive(uil, LA_M+p->TitleBar.B, LA_M, p->TW - LA_M - ScrollerW, 0, 0, p);
|
|
|
laRedrawPanel(p);
|
|
|
return 1;
|
|
|
}
|
|
@@ -4234,7 +4225,7 @@ void laRecalcCurrentPanel(){
|
|
|
void laRecalcPanelImmediate(laPanel* p){
|
|
|
p->FrameDistinguish++;
|
|
|
laBoxedTheme* bt = (*p->BT);
|
|
|
- int scrollw=p->UI.ScrollerShownV?bt->RM*2+LA_SCROLL_W:0;
|
|
|
+ int scrollw=p->UI.ScrollerShownV?LA_M*2+LA_SCROLL_W:0;
|
|
|
la_PanelRefreshDetachedProp(p);
|
|
|
int enclosed=0;
|
|
|
if(p->BoundUi || p->MenuRefer){
|
|
@@ -4244,15 +4235,15 @@ void laRecalcPanelImmediate(laPanel* p){
|
|
|
if(!enclosed){
|
|
|
la_PanelValidateWidth(p,&p->UI);
|
|
|
laEnsurePanelInBound(p,p->MenuRefer?p->MenuRefer:&p->UI);
|
|
|
- la_UpdateUiListRecursive(&p->TitleBar, bt->TM, bt->LM, p->TW-bt->RM, p->TH-bt->BM, 0, p);
|
|
|
+ la_UpdateUiListRecursive(&p->TitleBar, LA_M, LA_M, p->TW-LA_M, p->TH-LA_M, 0, p);
|
|
|
int UseB=p->TitleBar.TB; if((!p->Mode)||(p->Mode==LA_PANEL_FLOATING_PASSIVE)){ UseB=0; }
|
|
|
- la_UpdateUiListRecursive(&p->UI, UseB+bt->TM, bt->LM, p->TW-bt->RM-scrollw, p->TH-bt->BM, 0, p);
|
|
|
+ la_UpdateUiListRecursive(&p->UI, UseB+LA_M, LA_M, p->TW-LA_M-scrollw, p->TH-LA_M, 0, p);
|
|
|
}
|
|
|
laWindow* w=MAIN.CurrentWindow;
|
|
|
if(w->MaximizedUiPanel==p&&w->MaximizedUi){ int CW = w->CW; int CH = w->CH;
|
|
|
laUiItem* ui=w->MaximizedUi; ui->TU=ui->U=0; ui->TB=ui->B=CH; ui->TL=ui->L=0; ui->TR=ui->R=CW;
|
|
|
if(!ui->Page) return; laBoxedTheme* bt=(*ui->Type->Theme);
|
|
|
- la_UpdateUiListRecursive(ui->Page, ui->TU+bt->TM, ui->TL+bt->LM, ui->TR-bt->RM, ui->TB, 0, w->MaximizedUiPanel);
|
|
|
+ la_UpdateUiListRecursive(ui->Page, ui->TU+LA_M, ui->TL+LA_M, ui->TR-LA_M, ui->TB, 0, w->MaximizedUiPanel);
|
|
|
}
|
|
|
}
|
|
|
void laRecalcCurrentPanelImmediate(){
|
|
@@ -5624,7 +5615,7 @@ void la_CalcUiItemInfluence(laListHandle *lst, laUiItem *ui){
|
|
|
laColumn *c = ui->C;
|
|
|
laColumn *ic = lst->pFirst;
|
|
|
|
|
|
- c->B = ui->TB + (*ui->Type->Theme)->BP;
|
|
|
+ c->B = ui->TB + LA_M;
|
|
|
|
|
|
for (ic; ic; ic = ic->Item.pNext){
|
|
|
if (((ic->IR > c->IL) && (ic->IL < c->IR)) || ((ic->IL < c->IR) && (ic->IR > c->IL))){
|
|
@@ -5644,7 +5635,7 @@ void la_CalcUiTopInfluence(laListHandle *lst, laUiItem *ui){
|
|
|
laColumn *c = ui->C;
|
|
|
laColumn *ic = lst->pFirst;
|
|
|
|
|
|
- c->B = ui->TB + (*ui->Type->Theme)->TP;
|
|
|
+ c->B = ui->TB + LA_M;
|
|
|
|
|
|
for (ic; ic; ic = ic->Item.pNext){
|
|
|
if (((ic->IR > c->IL) && (ic->IL < c->IR)) || ((ic->IL < c->IR) && (ic->IR > c->IL))){
|
|
@@ -5664,7 +5655,7 @@ int la_ResetUiColum(laColumn *c, laColumn *Top, int U, int L, int R, int LR, int
|
|
|
int rep;
|
|
|
int sp;
|
|
|
int rev;
|
|
|
- int M=_LA_THEME_PANEL->LM+_LA_THEME_PANEL->RM;
|
|
|
+ int M=LA_M*2;
|
|
|
|
|
|
if (!c) return 0;
|
|
|
|
|
@@ -5742,7 +5733,7 @@ int la_InitRowNode(laRowInfo* ri, laUiItem* ui, laBoxedTheme* bt){
|
|
|
}
|
|
|
void la_AddRowNode(laRowInfo* ri, laUiItem* ui, laBoxedTheme* bt, int H, int WaitAnimation){
|
|
|
laRowNode* rn=CreateNew(laRowNode);
|
|
|
- rn->LP=bt->LP;rn->RP=bt->RP;
|
|
|
+ rn->LP=LA_M;rn->RP=LA_M;
|
|
|
rn->GotW = (ui->Type->GetMinWidth?ui->Type->GetMinWidth(ui):(LA_RH));
|
|
|
rn->ui=ui;
|
|
|
rn->H=H;
|
|
@@ -5753,13 +5744,13 @@ void la_AddRowNode(laRowInfo* ri, laUiItem* ui, laBoxedTheme* bt, int H, int Wai
|
|
|
if(ui->Flags&LA_UI_FLAGS_UNDERNEATH){ ri->LastNoHeight=1; };
|
|
|
|
|
|
if(!ri->UnitMinW){ri->UnitMinW=LA_RH;}
|
|
|
- ri->TotalPadding += (bt->LP+bt->RP);
|
|
|
+ ri->TotalPadding += LA_M*2;
|
|
|
ri->MinW+=ri->UnitMinW;
|
|
|
ri->NonExpandW+=rn->GotW;
|
|
|
ri->ExpandAccum+=ui->Expand;
|
|
|
ri->CountElements++;
|
|
|
if(ui->Expand){ri->Expand=1;}
|
|
|
- if(ri->U+H+bt->BP>ri->MaxB){ri->MaxB=ri->U+H+bt->BP;}
|
|
|
+ if(ri->U+H+LA_M>ri->MaxB){ri->MaxB=ri->U+H+LA_M;}
|
|
|
}
|
|
|
int la_ShrinkableRowElements(laRowInfo* ri){
|
|
|
int count=0;
|
|
@@ -5855,7 +5846,7 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
int WaitAnimation;
|
|
|
int RowMode=0; laRowInfo ri={0};
|
|
|
laBoxedTheme* pt=*(ParentPanel->BT);
|
|
|
- int _PL=-pt->LM,_PR=-pt->RM,_PT=-pt->TM,_PB=-pt->BM;
|
|
|
+ //int _PL=-pt->LM,_PR=-pt->RM,_PT=-pt->TM,_PB=-pt->BM;
|
|
|
int MaxR=0;
|
|
|
|
|
|
if(!uil->Scale){uil->Scale=1;}
|
|
@@ -5936,8 +5927,8 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
continue;
|
|
|
}else if (ui->Type == _LA_UI_CONDITION_TOGGLE){
|
|
|
laConditionUiExtraData *cued = ui->Extra;
|
|
|
- ui->TL = ui->C->IL + bt->LP; ui->TR = ui->C->IR - bt->RP;
|
|
|
- ui->TU = ui->C->B + bt->TP; ui->TB = ui->TU+LA_RH;
|
|
|
+ ui->TL = ui->C->IL + LA_M; ui->TR = ui->C->IR - LA_M;
|
|
|
+ ui->TU = ui->C->B + LA_M; ui->TB = ui->TU + LA_RH;
|
|
|
if (!WaitAnimation){
|
|
|
ui->L = ui->TL; ui->R = ui->TR;
|
|
|
ui->U = ui->TU; ui->B = ui->TB;
|
|
@@ -5950,8 +5941,6 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
}
|
|
|
if (ui->State == LA_UI_NORMAL){
|
|
|
cued->IsTrue = 0;
|
|
|
- //if(cued->Remove && (ui->Item.pNext != cued->EndUi))
|
|
|
- // la_DestroyUiRange(uil, ui->Item.pNext, cued->ElseUi?cued->ElseUi->Item.pPrev:cued->EndUi->Item.pPrev);
|
|
|
ui = cued->ElseUi ? cued->ElseUi : cued->EndUi;
|
|
|
}else{
|
|
|
cued->IsTrue = 1;
|
|
@@ -5964,7 +5953,7 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
}
|
|
|
|
|
|
if (ui->Type == _LA_UI_ALIGN){
|
|
|
- ui->TU = ui->C->B + bt->TP; ui->TB = ui->TU+LA_RH/5;
|
|
|
+ ui->TU = ui->C->B + LA_M; ui->TB = ui->TU+LA_RH/5;
|
|
|
ui->TL = ui->C->IL; ui->TR = ui->C->IR;
|
|
|
if (ui->TB > Lowest) Lowest = ui->TB;
|
|
|
if (!WaitAnimation){
|
|
@@ -5994,15 +5983,15 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
}
|
|
|
|
|
|
|
|
|
- if(!RowMode){ ui->TL = ui->C->IL + (NoGap?_PL:bt->LP); ui->TR = ui->C->IR - (NoGap?_PR:bt->RP); }
|
|
|
+ if(!RowMode){ ui->TL = ui->C->IL + (NoGap?-LA_M:LA_M); ui->TR = ui->C->IR - (NoGap?-LA_M:LA_M); }
|
|
|
|
|
|
int GB=0;
|
|
|
if (ui->Type == _LA_UI_FIXED_GROUP && ui->Page->HeightCoeff < 0 && ui->Flags&LA_UI_FLAGS_PREFER_BOTTOM){ GB=ui->Page->TB-ui->Page->PanY; }
|
|
|
|
|
|
H = ui->Type->GetHeight ? ui->Type->GetHeight(ui) : 1;
|
|
|
- ui->TU = ui->C->B + (NoGap?_PT:bt->TP);
|
|
|
+ ui->TU = ui->C->B + (NoGap?-LA_M:LA_M);
|
|
|
if (H < 0){
|
|
|
- if(B){ H = B + (H+1) * LA_RH - ui->TU+_PB+((H<-1)?_PT:0); }
|
|
|
+ if(B){ H = B + (H+1) * LA_RH - ui->TU-LA_M+((H<-1)?-LA_M:0); }
|
|
|
else{ H=LA_RH; }
|
|
|
}
|
|
|
else H *= LA_RH;
|
|
@@ -6061,9 +6050,9 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
laGetCategory(ui->PP.LastPs->p, ui->PP.LastPs->UseInstance, ui->PP.EndInstance, _cat, &cat); if(cat[0]) GotCategory=1;
|
|
|
}else GotCategory=0;
|
|
|
|
|
|
- if(GotCategory){ Begin+=LA_RH*(FirstIn?1:1.5)+bt->TM;
|
|
|
+ if(GotCategory){ Begin+=LA_RH*(FirstIn?1:1.5);
|
|
|
if (RowPriority){
|
|
|
- Row += 1; Col=0; Begin = ElementB+bt->TM+LA_RH*(FirstIn?1:1.5)+bt->TM;
|
|
|
+ Row += 1; Col=0; Begin = ElementB+LA_RH*(FirstIn?1:1.5);
|
|
|
}
|
|
|
}
|
|
|
FirstIn=0;
|
|
@@ -6088,12 +6077,12 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
la_AddInstancePage(ui, TInstance, 0); if(GotCategory){ strSafeSet(&ui->Page->TabName,cat); }
|
|
|
la_CalcUiTopInfluence(&uil->Columns, ui);
|
|
|
if (Template) laMakeUiListFromTemplate(ui->Page, Template, &ParentPanel->PP, &ParentPanel->PropLinkPP, &ui->PP, 0, &uil->Columns, ui->TemplateContext);
|
|
|
- SubB = la_UpdateUiListRecursive(ui->Page, Gap+Begin+(NoDecal?0:bt->TM), EL+(NoDecal?0:bt->LM), ER-(NoDecal?0:bt->RM), B, Fast, ParentPanel) +(NoDecal?0:bt->TM);
|
|
|
+ SubB = la_UpdateUiListRecursive(ui->Page, Gap+Begin, EL+(NoDecal?0:LA_M), ER-(NoDecal?0:LA_M), B, Fast, ParentPanel);
|
|
|
ElementB = RowPriority ? (SubB > ElementB ? SubB : ElementB) : SubB;
|
|
|
iuil = ui->Page->Item.pNext;
|
|
|
}else{
|
|
|
la_CalcUiTopInfluence(&uil->Columns, ui); if(GotCategory){ strSafeSet(&iuil->TabName,cat); }
|
|
|
- SubB = la_UpdateUiListRecursive(iuil, Gap+Begin+(NoDecal?0:bt->TM), EL+(NoDecal?0:bt->LM), ER-(NoDecal?0:bt->RM), B, Fast, ParentPanel) + (NoDecal?0:bt->TM);
|
|
|
+ SubB = la_UpdateUiListRecursive(iuil, Gap+Begin, EL+(NoDecal?0:LA_M), ER-(NoDecal?0:LA_M), B, Fast, ParentPanel);
|
|
|
ElementB = RowPriority ? (SubB > ElementB ? SubB : ElementB) : SubB;
|
|
|
la_CalcUiItemInfluence(&uil->Columns, ui);
|
|
|
iuil = iuil->Item.pNext;
|
|
@@ -6110,7 +6099,7 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
if (Col >= ElementLimit){
|
|
|
Col = 0;
|
|
|
Row += 1;
|
|
|
- Begin = ElementB + bt->TM;
|
|
|
+ Begin = ElementB;
|
|
|
}
|
|
|
}elif(Spread){
|
|
|
EL+=SpreadWidth;
|
|
@@ -6118,15 +6107,15 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
MaxER=TNS_MAX2(ER,MaxER);
|
|
|
if((!uil->AllowScale) && (ER > ui->TR)){
|
|
|
EL=ui->TL; ER=SpreadWidth+EL;
|
|
|
- Begin = ElementB + bt->TM;
|
|
|
+ Begin = ElementB;
|
|
|
}
|
|
|
}else{
|
|
|
Row += 1;
|
|
|
- Begin = ElementB + bt->TM;
|
|
|
+ Begin = ElementB;
|
|
|
if (ElementLimit && Row >= ElementLimit){
|
|
|
Row = 0;
|
|
|
Col += 1;
|
|
|
- Begin = ui->TU + bt->TM;
|
|
|
+ Begin = ui->TU;
|
|
|
}
|
|
|
}
|
|
|
ui->TB = ElementB;
|
|
@@ -6148,12 +6137,14 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
if(!Template) Template=laui_SubPropInfoDefault;
|
|
|
//ui->Template = Template;
|
|
|
int EraseWidth=(ui->Type == _LA_UI_COLLECTION_SELECTOR)?LA_RH:0;
|
|
|
+ int TopPad = (ui->Type == _LA_UI_COLLECTION_SINGLE)?(NoDecal?-LA_M:LA_M):-LA_M;
|
|
|
+ int SidePad = NoDecal?-LA_M:LA_M;
|
|
|
if (!ui->Subs.pFirst && TInstance){
|
|
|
la_AddInstancePage(ui, TInstance, 0);
|
|
|
la_CalcUiTopInfluence(&uil->Columns, ui);
|
|
|
laMakeUiListFromTemplate(ui->Page, Template, &ParentPanel->PP, &ParentPanel->PropLinkPP, &ui->PP, 0, &uil->Columns, ui->TemplateContext);
|
|
|
- SubB = la_UpdateUiListRecursive(ui->Page, ui->TB+(NoDecal?0:bt->TM), ui->TL+(NoDecal?0:bt->LM), ui->TR-(NoDecal?0:bt->RM)-EraseWidth, B, Fast, ParentPanel);
|
|
|
- ui->TB = SubB + (NoDecal?0:bt->BM);
|
|
|
+ SubB = la_UpdateUiListRecursive(ui->Page, ui->TB+TopPad, ui->TL+SidePad, ui->TR-SidePad-EraseWidth, B, Fast, ParentPanel);
|
|
|
+ ui->TB = SubB - (NoDecal?0:LA_M);
|
|
|
}else if (ui->Subs.pFirst){
|
|
|
if (!TInstance || TInstance != ui->Page->Instance){
|
|
|
la_DestroyTabPage(ui, ui->Subs.pFirst, 0);
|
|
@@ -6162,18 +6153,21 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
la_AddInstancePage(ui, TInstance, 0);
|
|
|
la_CalcUiTopInfluence(&uil->Columns, ui);
|
|
|
laMakeUiListFromTemplate(ui->Page, Template, &ParentPanel->PP, &ParentPanel->PropLinkPP, &ui->PP, 0, &uil->Columns, ui->TemplateContext);
|
|
|
- SubB = la_UpdateUiListRecursive(ui->Page, ui->TB+(NoDecal?0:bt->TM), ui->TL+(NoDecal?0:bt->LM), ui->TR-(NoDecal?0:bt->RM)-EraseWidth, B, Fast, ParentPanel);
|
|
|
- ui->TB = SubB + (NoDecal?0:bt->TM);
|
|
|
+ SubB = la_UpdateUiListRecursive(ui->Page, ui->TB+TopPad, ui->TL+SidePad, ui->TR-SidePad-EraseWidth, B, Fast, ParentPanel);
|
|
|
+ ui->TB = SubB - (NoDecal?0:LA_M);
|
|
|
}else
|
|
|
- ui->TB = ui->TU + LA_RH + bt->BM;
|
|
|
+ ui->TB = ui->TU + LA_RH;// + bt->BM;
|
|
|
}else{
|
|
|
- SubB = la_UpdateUiListRecursive(ui->Page, ui->TB+(NoDecal?0:bt->TM), ui->TL+(NoDecal?0:bt->LM), ui->TR-(NoDecal?0:bt->RM)-EraseWidth, B, Fast, ParentPanel);
|
|
|
- ui->TB = SubB + (NoDecal?0:bt->BM);
|
|
|
+ SubB = la_UpdateUiListRecursive(ui->Page, ui->TB+TopPad, ui->TL+SidePad, ui->TR-SidePad-EraseWidth, B, Fast, ParentPanel);
|
|
|
+ ui->TB = SubB - (NoDecal?0:LA_M);
|
|
|
}
|
|
|
}
|
|
|
if(ui->Type == _LA_UI_COLLECTION_SELECTOR && (ui->TB>(ui->TU+LA_RH*0.9))&&(ui->TB<ui->TU+(LA_RH*1.1))){
|
|
|
ui->TB=ui->TU+LA_RH;
|
|
|
}
|
|
|
+ if(ui->Type == _LA_UI_COLLECTION_SINGLE){
|
|
|
+ ui->TB+= NoDecal?0:LA_M*2;
|
|
|
+ }
|
|
|
}
|
|
|
if (ui->TB-ui->TU<LA_RH) ui->TB = ui->TU + LA_RH;
|
|
|
if (!WaitAnimation){
|
|
@@ -6186,40 +6180,40 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
}else{
|
|
|
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;
|
|
|
+ int scrollw=ui->Page->ScrollerShownV?LA_M*2+LA_SCROLL_W: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->State == LA_UI_ACTIVE ? 0 : LA_RH)+(NoDecal?0:LA_M), ui->TL+(NoDecal?0:LA_M), ui->TR-(NoDecal?0:LA_M)-scrollw, B, Fast, ParentPanel);
|
|
|
ui->TB = (ui->Page->HeightCoeff > 0 ? ui->TU + ui->Page->HeightCoeff * LA_RH :
|
|
|
- (ui->Page->HeightCoeff < 0 ? B + (ui->Page->HeightCoeff+1) * LA_RH + (_PB+_PT)+(ui->Page->HeightCoeff==-2?_PB:0) : SubB)) + (NoDecal?0:bt->BM);
|
|
|
- int subh = ui->TB-ui->TU-LA_RH-bt->TM-bt->BM;
|
|
|
- if((ui->Page->TR>ui->TR-(NoDecal?0:bt->RM) && (!ui->Page->ScrollerShownH)) ||
|
|
|
- (ui->Page->TR<=ui->TR-(NoDecal?0:bt->RM) && ui->Page->ScrollerShownH)){
|
|
|
+ (ui->Page->HeightCoeff < 0 ? B + (ui->Page->HeightCoeff+1) * LA_RH - (LA_M*2)+(ui->Page->HeightCoeff==-2?-LA_M:0) : SubB)) + (NoDecal?0:LA_M);
|
|
|
+ int subh = ui->TB-ui->TU-LA_RH-LA_M*2;
|
|
|
+ if((ui->Page->TR>ui->TR-(NoDecal?0:LA_M) && (!ui->Page->ScrollerShownH)) ||
|
|
|
+ (ui->Page->TR<=ui->TR-(NoDecal?0:LA_M) && ui->Page->ScrollerShownH)){
|
|
|
ui->Page->ScrollerShownH=!ui->Page->ScrollerShownH;
|
|
|
}
|
|
|
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(ui->Page->ScrollerShownH){subh-=LA_SCROLL_W-LA_M;}
|
|
|
+ if((GB && ui->TB >= GB)||first_in){ ui->Page->PanY=(SubB-ui->TB-LA_M); 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)){
|
|
|
ui->Page->ScrollerShownV=!ui->Page->ScrollerShownV;
|
|
|
ParentPanel->Refresh|=LA_TAG_RECALC_SCROLLER; laRefreshWindow();
|
|
|
}
|
|
|
- if(SubB-ui->Page->PanY<ui->TB-bt->BM-(ui->Page->ScrollerShownH?LA_SCROLL_W+bt->BM:0)){
|
|
|
- ui->Page->PanY = (SubB-ui->TB-bt->BM+(ui->Page->ScrollerShownH?LA_SCROLL_W+bt->BM:0));
|
|
|
+ if(SubB-ui->Page->PanY<ui->TB-LA_M-(ui->Page->ScrollerShownH?LA_SCROLL_W+LA_M:0)){
|
|
|
+ ui->Page->PanY = (SubB-ui->TB-LA_M+(ui->Page->ScrollerShownH?LA_SCROLL_W+LA_M:0));
|
|
|
if(ui->Page->PanY<0){ui->Page->PanY=0;}
|
|
|
//ParentPanel->Refresh|=LA_TAG_RECALC_SCROLLER;
|
|
|
}
|
|
|
}
|
|
|
if(ui->Page->ScrollerShownH && !ui->Page->HeightCoeff){
|
|
|
- ui->TB+=(bt->BP*2+LA_SCROLL_W); }
|
|
|
+ ui->TB+=(LA_M*2+LA_SCROLL_W); }
|
|
|
}else{
|
|
|
laUiList *suil;
|
|
|
if(!MAIN.CurrentWindow->MaximizedUi || ui!=MAIN.CurrentWindow->MaximizedUi){
|
|
|
la_CalcUiTopInfluence(&uil->Columns, ui);
|
|
|
for (suil = ui->Subs.pFirst; suil; suil = suil->Item.pNext){
|
|
|
- SubB = la_UpdateUiListRecursive(suil, ui->TB+(NoDecal?0:bt->TM), ui->TL+(NoDecal?0:bt->LM), ui->TR-(NoDecal?0:bt->RM), ui->TU+H, Fast, ParentPanel);
|
|
|
+ SubB = la_UpdateUiListRecursive(suil, ui->TB+(NoDecal?0:LA_M), ui->TL+(NoDecal?0:LA_M), ui->TR-(NoDecal?0:LA_M), ui->TU+H, Fast, ParentPanel);
|
|
|
}
|
|
|
}
|
|
|
ui->TB = ui->TU + H;
|
|
@@ -6227,7 +6221,7 @@ int la_UpdateUiListRecursive(laUiList *uil, int U, int L, int R, int B, int Fast
|
|
|
}else ui->TB = ui->TU + H;
|
|
|
}
|
|
|
|
|
|
- if (ui->TB > Lowest && (!NoHeight)) Lowest = ui->TB + (bt ? (NoGap?_PB:bt->BP) : 0);
|
|
|
+ if (ui->TB > Lowest && (!NoHeight)) Lowest = ui->TB + (bt ? (NoGap?-LA_M:LA_M) : 0);
|
|
|
if(!RowMode){
|
|
|
if(!NoHeight) la_CalcUiItemInfluence(&uil->Columns, ui);
|
|
|
}else{
|
|
@@ -6380,7 +6374,7 @@ void la_DrawUiListArrows(laUiList *uil, int L, int R, int U, int B, real* color)
|
|
|
void la_DrawUiListScrollerV(laUiList *uil, int DisplayOffset, int TotalH, int DisplayH, int UiR){
|
|
|
if(!uil->ScrollerShownV) return;
|
|
|
|
|
|
- int W = LA_SCROLL_W, RM=_LA_THEME_PANEL->RM;
|
|
|
+ int W = LA_SCROLL_W, RM=LA_M;
|
|
|
int Len = (int)((real)DisplayH / (real)TotalH * (real)DisplayH);
|
|
|
int Offset = (int)((real)DisplayOffset / (real)TotalH * (real)DisplayH);
|
|
|
int U = uil->U + Offset;
|
|
@@ -6428,7 +6422,7 @@ void la_DrawUiListScrollerV(laUiList *uil, int DisplayOffset, int TotalH, int Di
|
|
|
void la_DrawUiListScrollerH(laUiList *uil, int DisplayOffset, int TotalW, int DisplayW, int UiB){
|
|
|
if(!uil->ScrollerShownH) return;
|
|
|
|
|
|
- int W = LA_SCROLL_W,RM=_LA_THEME_PANEL->RM;
|
|
|
+ int W = LA_SCROLL_W,RM=LA_M;
|
|
|
int Len = (int)((real)DisplayW / (real)TotalW * (real)DisplayW);
|
|
|
int Offset = (int)((real)DisplayOffset / (real)TotalW * (real)DisplayW);
|
|
|
int L = uil->L + Offset;
|
|
@@ -6686,15 +6680,15 @@ int la_DrawUiListRecursive(laUiListDraw *uild, laUiList *uil, int L, int R, int
|
|
|
ui->Type == _LA_UI_COLLECTION_SINGLE ||
|
|
|
ui->Type == _LA_UI_COLLECTION_SELECTOR && (ui->Subs.pFirst || ui->Page)){
|
|
|
if (!ui->Page){ ui = ui->Item.pNext; continue; }
|
|
|
- tnsFlush(); int DoNodes=RegisterNodes; int NoDecal=ui->Flags&LA_UI_FLAGS_NO_DECAL;
|
|
|
+ tnsFlush(); int DoNodes=RegisterNodes; int NoDecal=ui->Flags&LA_UI_FLAGS_NO_DECAL; int SidePad=NoDecal?-LA_M:LA_M;
|
|
|
if(ui->Flags&LA_UI_FLAGS_NODE_CONTAINER){ la_InitSocketRecord(uild, ui->Page); DoNodes=1; }
|
|
|
- Ret += la_DrawUiListRecursive(uild, ui->Page, ui->L+(NoDecal?0:bt->LM), ui->R-(NoDecal?0:bt->RM), U, B,
|
|
|
- (ui->Page->HeightCoeff ? ui->B - ui->Page->U : 10000) -(NoDecal?0:bt->LM), ConditionStackLevel, GlobalX, GlobalY, DoNodes);
|
|
|
+ Ret += la_DrawUiListRecursive(uild, ui->Page, ui->L+SidePad, ui->R-SidePad, U, B,
|
|
|
+ (ui->Page->HeightCoeff ? ui->B - ui->Page->U : 10000) -(NoDecal?0:LA_M), ConditionStackLevel, GlobalX, GlobalY, DoNodes);
|
|
|
if (ui->Page->ScrollerShownH){ la_DrawUiListScrollerH(ui->Page, ui->Page->PanX,
|
|
|
- ui->Page->R-ui->Page->L-bt->RM-bt->LM, ui->R-ui->Page->L-bt->RM-bt->LM-(ui->Page->ScrollerShownV?LA_SCROLL_W:0),ui->B); }
|
|
|
+ ui->Page->R-ui->Page->L-LA_M*2, ui->R-ui->Page->L-LA_M*2-(ui->Page->ScrollerShownV?LA_SCROLL_W:0),ui->B); }
|
|
|
if (ui->Page->HeightCoeff) la_DrawUiListScrollerV(ui->Page, ui->Page->PanY,
|
|
|
- ui->Page->B-ui->Page->U-(NoDecal?0:bt->TM-bt->BM), ui->B-ui->Page->U-(NoDecal?0:bt->TM-bt->BM)-(ui->Page->ScrollerShownH?LA_SCROLL_W+bt->RM:0),ui->R);
|
|
|
- if (ui->Page->AllowScale){ la_DrawUiListArrows(ui->Page,ui->L, ui->R, ui->Page->U, ui->B-LA_SCROLL_W-bt->BM*2, laThemeColor(bt, LA_BT_BORDER)); }
|
|
|
+ ui->Page->B-ui->Page->U-(NoDecal?0:LA_M-LA_M), ui->B-ui->Page->U-(NoDecal?0:LA_M-LA_M)-(ui->Page->ScrollerShownH?LA_SCROLL_W+LA_M:0),ui->R);
|
|
|
+ if (ui->Page->AllowScale){ la_DrawUiListArrows(ui->Page,ui->L, ui->R, ui->Page->U, ui->B-LA_SCROLL_W-LA_M*2, laThemeColor(bt, LA_BT_BORDER)); }
|
|
|
}elif (ui->Type == _LA_UI_COLLECTION){
|
|
|
int CanGetState = laCanGetState(ui->PP.LastPs->p);
|
|
|
int CanGetTheme = laCanGetTheme(ui->PP.LastPs->p);laTheme* OriginalTheme=MAIN.CurrentTheme;
|
|
@@ -6708,12 +6702,12 @@ int la_DrawUiListRecursive(laUiListDraw *uild, laUiList *uil, int L, int R, int
|
|
|
|
|
|
if(NeedDraw){ int drawn=0;
|
|
|
if (!(ui->Flags&LA_UI_COLLECTION_NO_HIGHLIGHT) && sub->Instance == Active){
|
|
|
- la_DrawInstanceBkg(sub, laAccentColor(LA_BT_NORMAL),bt->LP,bt->RP); drawn=1;
|
|
|
+ la_DrawInstanceBkg(sub, laAccentColor(LA_BT_NORMAL),LA_M,LA_M); drawn=1;
|
|
|
}
|
|
|
if (CanGetState && !drawn){
|
|
|
State = laGetUiState(ui->PP.LastPs->p, sub->Instance);
|
|
|
if(State >= 0){
|
|
|
- la_DrawInstanceBkg(sub, laAccentColor(State),bt->LP,bt->RP);
|
|
|
+ la_DrawInstanceBkg(sub, laAccentColor(State),LA_M,LA_M);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -6722,14 +6716,14 @@ int la_DrawUiListRecursive(laUiListDraw *uild, laUiList *uil, int L, int R, int
|
|
|
int NoDecal=ui->Flags&LA_UI_FLAGS_NO_DECAL;
|
|
|
int NoGap=ui->Flags&LA_UI_FLAGS_NO_GAP;
|
|
|
tnsDrawStringAuto(transLate(sub->TabName->Ptr),laThemeColor(bt,LA_BT_DISABLED|LA_BT_TEXT),
|
|
|
- ui->L+(NoDecal?0:bt->LM)+(NoGap?0:bt->LP),ui->R,sub->U-LA_RH,LA_TEXT_MONO);
|
|
|
+ ui->L+(NoDecal?0:LA_M)+(NoGap?0:LA_M),ui->R,sub->U-LA_RH,LA_TEXT_MONO);
|
|
|
tnsFlush();
|
|
|
}
|
|
|
|
|
|
if(CanGetTheme){
|
|
|
laTheme* t=laGetUiTheme(ui->PP.LastPs->p, ui->PP.LastPs->UseInstance, ui->PP.EndInstance);
|
|
|
la_SwitchThemeQuick(t, OriginalTheme);
|
|
|
- if(t) la_DrawInstanceBkg(sub, laThemeColor(_LA_THEME_FLOATING_PANEL ,LA_BT_NORMAL),bt->LP,bt->RP);
|
|
|
+ if(t) la_DrawInstanceBkg(sub, laThemeColor(_LA_THEME_FLOATING_PANEL ,LA_BT_NORMAL),LA_M,LA_M);
|
|
|
}
|
|
|
|
|
|
tnsFlush();
|
|
@@ -6743,7 +6737,7 @@ int la_DrawUiListRecursive(laUiListDraw *uild, laUiList *uil, int L, int R, int
|
|
|
if(!(ui->Flags&LA_UI_FLAGS_NO_OVERLAY)){
|
|
|
for (sub = ui->Subs.pFirst; sub; sub = sub->Item.pNext){
|
|
|
tnsFlush();
|
|
|
- Ret += la_DrawUiListRecursive(uild, sub, L-1, R+1, U-1, B+1, ui->B-bt->TP-bt->BP-bt->BM-bt->TM, ConditionStackLevel, GlobalX, GlobalY, RegisterNodes);
|
|
|
+ Ret += la_DrawUiListRecursive(uild, sub, L-1, R+1, U-1, B+1, ui->B-LA_M*2-LA_M*2, ConditionStackLevel, GlobalX, GlobalY, RegisterNodes);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -6977,9 +6971,9 @@ laUiList *la_DetectUiListRecursive(laUiList *uil, int x, int y, int LimH,
|
|
|
if ((ui->Type == _LA_UI_FIXED_GROUP || ui->Type == _LA_UI_TAB) && (ui->Subs.pFirst || ui->Page)){
|
|
|
if (ui->Page->HeightCoeff) CPB = ui->B+ui->Page->PanY;
|
|
|
else CPB = ui->Page->B;
|
|
|
- if (ui->Page->ScrollerShownV && laIsInBound(x, y, ui->R - LA_SCROLL_W - bt->RP*2, ui->R, ui->Page->U, CPB)){
|
|
|
+ if (ui->Page->ScrollerShownV && laIsInBound(x, y, ui->R - LA_SCROLL_W - LA_M*2, ui->R, ui->Page->U, CPB)){
|
|
|
if (ScrollUil) *ScrollUil = ui->Page; if (ParentUi) *ParentUi = ui;
|
|
|
- }elif (ui->Page->ScrollerShownH && laIsInBound(x, y, ui->Page->L, ui->Page->R, ui->B - LA_SCROLL_W - bt->BP*2, ui->B)){
|
|
|
+ }elif (ui->Page->ScrollerShownH && laIsInBound(x, y, ui->Page->L, ui->Page->R, ui->B - LA_SCROLL_W - LA_M*2, ui->B)){
|
|
|
if (ScrollUil) *ScrollUil = ui->Page; if (ParentUi) *ParentUi = ui;
|
|
|
}elif (laIsInBound(x, y, ui->Page->L, ui->Page->R, ui->Page->U, CPB)){
|
|
|
if (ParentUi) *ParentUi = ui;
|
|
@@ -7064,9 +7058,9 @@ laUiList *la_DetectUiListRecursiveDeep(laUiList *uil, int x, int y, int LimH, la
|
|
|
if ((ui->Type == _LA_UI_FIXED_GROUP || ui->Type == _LA_UI_TAB) && (ui->Subs.pFirst || ui->Page)){
|
|
|
if (ui->Page->HeightCoeff) CPB = ui->B;
|
|
|
else CPB = ui->Page->B;
|
|
|
- if (ui->Page->ScrollerShownV && laIsInBound(x, y, ui->R - LA_SCROLL_W - bt->RP*2, ui->R, ui->Page->U, CPB)){
|
|
|
+ if (ui->Page->ScrollerShownV && laIsInBound(x, y, ui->R - LA_SCROLL_W - LA_M*2, ui->R, ui->Page->U, CPB)){
|
|
|
if (ScrollUil) *ScrollUil = ui->Page; if (ParentUi) *ParentUi = ui; uilr->pui=ui;
|
|
|
- }elif (ui->Page->ScrollerShownH && laIsInBound(x, y, ui->Page->L, ui->Page->R, ui->B - LA_SCROLL_W - bt->BP*2, ui->B)){
|
|
|
+ }elif (ui->Page->ScrollerShownH && laIsInBound(x, y, ui->Page->L, ui->Page->R, ui->B - LA_SCROLL_W - LA_M*2, ui->B)){
|
|
|
if (ScrollUil) *ScrollUil = ui->Page; if (ParentUi) *ParentUi = ui; uilr->pui=ui;
|
|
|
}elif (laIsInBound(x, y, ui->Page->L, ui->Page->R, ui->Page->U, CPB)){
|
|
|
if (ParentUi) *ParentUi = ui; uilr->pui=ui;
|
|
@@ -7078,7 +7072,7 @@ laUiList *la_DetectUiListRecursiveDeep(laUiList *uil, int x, int y, int LimH, la
|
|
|
if (ui->Page->HeightCoeff) CPB = ui->B;
|
|
|
else
|
|
|
CPB = ui->Page->B;
|
|
|
- if (laIsInBound(x, y, ui->Page->R, ui->Page->R + LA_SCROLL_W + bt->RM, ui->Page->U, CPB)){
|
|
|
+ if (laIsInBound(x, y, ui->Page->R, ui->Page->R + LA_SCROLL_W + LA_M, ui->Page->U, CPB)){
|
|
|
if (ScrollUil) *ScrollUil = ui->Page;
|
|
|
if (ParentUi) *ParentUi = ui; uilr->pui=ui;
|
|
|
}
|
|
@@ -7106,7 +7100,7 @@ int la_TestUiListMinumWidth(laUiList *uil){
|
|
|
bt = ui->Type->Theme ? (*ui->Type->Theme) : 0;
|
|
|
|
|
|
if ((ui->Type == _LA_UI_FIXED_GROUP || ui->Type == _LA_UI_TAB) && (ui->Subs.pFirst || ui->Page)){
|
|
|
- tW = la_TestUiListMinumWidth(ui->Page) + bt->LP + bt->RP;
|
|
|
+ tW = la_TestUiListMinumWidth(ui->Page) + LA_M*2;
|
|
|
tW = (int)((float)tW / ui->C->PreWidth + 2);
|
|
|
if (W < tW) W = tW;
|
|
|
}elif (ui->Type == _LA_UI_COLLECTION){
|
|
@@ -7114,7 +7108,7 @@ int la_TestUiListMinumWidth(laUiList *uil){
|
|
|
tW = 0; sW = 0;
|
|
|
for (sub = ui->Subs.pFirst; sub; sub = sub->Item.pNext){
|
|
|
ui->PP.EndInstance = sub->Instance;
|
|
|
- sW = la_TestUiListMinumWidth(sub) + bt->LP + bt->RP;
|
|
|
+ sW = la_TestUiListMinumWidth(sub) + LA_M*2;
|
|
|
if (sW > tW) tW = sW;
|
|
|
}
|
|
|
ui->PP.EndInstance = Restore;
|
|
@@ -7126,7 +7120,7 @@ int la_TestUiListMinumWidth(laUiList *uil){
|
|
|
}elif (ui->Type==&_LA_UI_ROW_END){
|
|
|
RowMode=0; rW=(int)((float)rW / ui->C->PreWidth + 2); if (W < rW) W = rW;
|
|
|
}elif (ui->Type->GetMinWidth){
|
|
|
- tW = ui->Type->GetMinWidth(ui) + bt->LP + bt->RP;
|
|
|
+ tW = ui->Type->GetMinWidth(ui) + LA_M*2;
|
|
|
if(RowMode){ rW+=tW; }else{ tW = (int)((float)tW / ui->C->PreWidth + 2); if (W < tW) W = tW; }
|
|
|
}
|
|
|
ui = ui->Item.pNext;
|
|
@@ -8308,12 +8302,16 @@ void la_DrawWindow(laWindow *w){
|
|
|
MAIN.CurrentWindow = w;
|
|
|
la_WindowDefDraw(w, 0);
|
|
|
}
|
|
|
+
|
|
|
+void laset_UiRowHeight(void* unused, int val);
|
|
|
int laFinalize(){
|
|
|
if(!laValidateProperties()){ laShutoff(0); return 0; }
|
|
|
|
|
|
laUiTemplate* uit;
|
|
|
while(uit=lstPopItem(&MAIN.InitPanelTemplates)) lstAppendItem(&MAIN.PanelTemplates,uit);
|
|
|
|
|
|
+ laset_UiRowHeight(0, LA_RH0);
|
|
|
+
|
|
|
return 1;
|
|
|
}
|
|
|
void la_PreFrame(){
|