forked from mbk-lab/rui_orig
2
0
Fork 0

Bug fixing

This commit is contained in:
Alexei Anoshenko 2022-08-02 12:21:53 +03:00
parent 0adb38d234
commit e0aa021384
1 changed files with 13 additions and 10 deletions

View File

@ -334,45 +334,48 @@ func (popup popupData) createArrow(arrow int, align int, size SizeUnit, off Size
popupParams := Params{ popupParams := Params{
MaxWidth: Percent(100), MaxWidth: Percent(100),
MaxHeight: Percent(100), MaxHeight: Percent(100),
Row: 1,
Column: 1,
Content: popupView, Content: popupView,
} }
arrowParams := Params{ arrowParams := Params{
Width: size, Width: size,
Height: size, Height: size,
} }
containerParams := Params{ containerParams := Params{
MaxWidth: Percent(100), MaxWidth: Percent(100),
MaxHeight: Percent(100), MaxHeight: Percent(100),
CellWidth: []SizeUnit{AutoSize(), Fr(1), AutoSize()},
CellHeight: []SizeUnit{AutoSize(), Fr(1), AutoSize()},
} }
switch arrow { switch arrow {
case TopArrow: case TopArrow:
arrowParams[Column] = 1
arrowParams[BorderBottom] = border arrowParams[BorderBottom] = border
arrowParams[BorderLeft] = border2 arrowParams[BorderLeft] = border2
arrowParams[BorderRight] = border2 arrowParams[BorderRight] = border2
popupParams[Row] = 1
containerParams[CellHeight] = []SizeUnit{AutoSize(), Fr(1)}
case RightArrow: case RightArrow:
arrowParams[Column] = 1 arrowParams[Column] = 2
arrowParams[Row] = 1
arrowParams[BorderLeft] = border arrowParams[BorderLeft] = border
arrowParams[BorderTop] = border2 arrowParams[BorderTop] = border2
arrowParams[BorderBottom] = border2 arrowParams[BorderBottom] = border2
containerParams[CellWidth] = []SizeUnit{Fr(1), AutoSize()}
case BottomArrow: case BottomArrow:
arrowParams[Row] = 1 arrowParams[Column] = 1
arrowParams[Row] = 2
arrowParams[BorderTop] = border arrowParams[BorderTop] = border
arrowParams[BorderLeft] = border2 arrowParams[BorderLeft] = border2
arrowParams[BorderRight] = border2 arrowParams[BorderRight] = border2
containerParams[CellHeight] = []SizeUnit{Fr(1), AutoSize()}
case LeftArrow: case LeftArrow:
arrowParams[Row] = 1
arrowParams[BorderRight] = border arrowParams[BorderRight] = border
arrowParams[BorderTop] = border2 arrowParams[BorderTop] = border2
arrowParams[BorderBottom] = border2 arrowParams[BorderBottom] = border2
popupParams[Column] = 1
containerParams[CellWidth] = []SizeUnit{AutoSize(), Fr(1)}
default: default:
return popupView return popupView