forked from mbk-lab/rui_orig
Bug fixing
This commit is contained in:
parent
0adb38d234
commit
e0aa021384
19
popup.go
19
popup.go
|
@ -334,8 +334,11 @@ 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,
|
||||||
|
@ -343,36 +346,36 @@ func (popup popupData) createArrow(arrow int, align int, size SizeUnit, off 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
|
||||||
|
|
Loading…
Reference in New Issue