ScrollView: Fix layout routine and correctly propagate focus events.
[GB.GUI.BASE] * BUG: ScrollView: Fix layout routine. * BUG: ScrollView: Correctly propagate focus events.
This commit is contained in:
parent
0cafd5dab9
commit
0dc57ad4ad
@ -54,12 +54,22 @@ Private Sub AutoResizeContents()
|
||||
|
||||
Do
|
||||
|
||||
W = 0
|
||||
H = 0
|
||||
|
||||
For Each hChild In $hCont.Children
|
||||
If Not hChild.Visible Then Continue
|
||||
W = Max(W, hChild.X + hChild.W)
|
||||
H = Max(H, hChild.Y + hChild.H)
|
||||
Next
|
||||
|
||||
If Me.Margin Then
|
||||
D = Me.Padding
|
||||
If D = 0 Then D = Desktop.Scale
|
||||
W += D
|
||||
H += D
|
||||
Endif
|
||||
|
||||
Select Case Me.Arrangement
|
||||
Case Arrange.Horizontal, Arrange.TopBottom
|
||||
H = Me.ClientH
|
||||
@ -73,13 +83,6 @@ Private Sub AutoResizeContents()
|
||||
|
||||
Loop
|
||||
|
||||
If Me.Margin Then
|
||||
D = Me.Padding
|
||||
If D = 0 Then D = Desktop.Scale
|
||||
W += D
|
||||
H += D
|
||||
Endif
|
||||
|
||||
W = Max(Me.ClientW, W)
|
||||
H = Max(Me.ClientH, H)
|
||||
|
||||
@ -95,8 +98,16 @@ Private Sub AutoResizeContents()
|
||||
|
||||
End
|
||||
|
||||
Public Sub Panel_MouseDown()
|
||||
|
||||
Me.SetFocus
|
||||
'Me.DrawingArea_MouseWheel
|
||||
|
||||
End
|
||||
|
||||
Public Sub Panel_MouseWheel()
|
||||
|
||||
Me.SetFocus
|
||||
Me.DrawingArea_MouseWheel
|
||||
|
||||
End
|
||||
|
Loading…
x
Reference in New Issue
Block a user