[GB.GUI.BASE]
* BUG: GridView: Best row height computation now correctly takes the borders into account. git-svn-id: svn://localhost/gambas/trunk@7591 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
d362153256
commit
e838904258
5 changed files with 17 additions and 9 deletions
|
@ -1,12 +1,12 @@
|
|||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 3.8.90
|
||||
Title=gb.gui.base
|
||||
Startup=FGridView
|
||||
Startup=MMain
|
||||
Version=3.8.90
|
||||
VersionFile=1
|
||||
Component=gb.image
|
||||
Component=gb.gui
|
||||
Environment="GB_GUI=gb.qt5\nLIBOVERLAY_SCROLLBAR=0"
|
||||
Environment="LIBOVERLAY_SCROLLBAR=0"
|
||||
TabSize=2
|
||||
Language=fr
|
||||
Type=Component
|
||||
|
|
|
@ -134,7 +134,7 @@ Private Sub GetRectF(hRect As RectF, bPadding As Boolean, TopBorder As Border, B
|
|||
End
|
||||
|
||||
|
||||
Public Sub Paint(Rect As RectF, Optional TopBorder As Border, BottomBorder As Border, LeftBorder As Border, RightBorder As Border)
|
||||
Public Sub Paint((Rect) As RectF, Optional TopBorder As Border, BottomBorder As Border, LeftBorder As Border, RightBorder As Border)
|
||||
|
||||
Dim fWidth As Single
|
||||
Dim iStyle As Integer
|
||||
|
@ -602,7 +602,7 @@ Private Sub ConvertToRect(hRect As RectF) As Rect
|
|||
End
|
||||
|
||||
|
||||
Public Sub GetRect(Rect As RectF, Optional WithPadding As Boolean, Optional TopBorder As Border, BottomBorder As Border, LeftBorder As Border, RightBorder As Border) As Rect
|
||||
Public Sub GetRect((Rect) As RectF, Optional WithPadding As Boolean, Optional TopBorder As Border, BottomBorder As Border, LeftBorder As Border, RightBorder As Border) As Rect
|
||||
|
||||
Rect = GetRectF({Rect}, WithPadding, TopBorder, BottomBorder, LeftBorder, RightBorder)
|
||||
If Rect.IsVoid() Then Return
|
||||
|
@ -612,7 +612,7 @@ Public Sub GetRect(Rect As RectF, Optional WithPadding As Boolean, Optional TopB
|
|||
End
|
||||
|
||||
|
||||
Public Sub Clip(Rect As RectF, Optional TopBorder As Border, BottomBorder As Border, LeftBorder As Border, RightBorder As Border) As Rect
|
||||
Public Sub Clip((Rect) As RectF, Optional TopBorder As Border, BottomBorder As Border, LeftBorder As Border, RightBorder As Border) As Rect
|
||||
|
||||
Rect = GetRectF(Rect, False, TopBorder, BottomBorder, LeftBorder, RightBorder)
|
||||
If Rect.IsVoid() Then Return Null
|
||||
|
|
|
@ -2172,9 +2172,11 @@ Public Sub _GetPreferredHeight(iRow As Integer) As Integer
|
|||
If Not hFont Then hFont = Me.Font
|
||||
|
||||
WT = WC - iPadding * 2 - 2
|
||||
If .Border Then
|
||||
WT -= .Border.LeftPadding + .Border.RightPadding + .Border.LeftMargin + .Border.RightMargin + .Border.LeftWidth + .Border.RightWidth
|
||||
Endif
|
||||
|
||||
hBorder = $hRows._GetRowBorder(iRow)
|
||||
If hBorder Then WT -= hBorder.LeftPadding + hBorder.RightPadding + hBorder.LeftMargin + hBorder.RightMargin + hBorder.LeftWidth + hBorder.RightWidth
|
||||
hBorder = .Border
|
||||
If hBorder Then WT -= hBorder.LeftPadding + hBorder.RightPadding + hBorder.LeftMargin + hBorder.RightMargin + hBorder.LeftWidth + hBorder.RightWidth
|
||||
|
||||
If .RichText Then
|
||||
If .WordWrap Then
|
||||
|
|
|
@ -33,4 +33,10 @@
|
|||
|
||||
Public Sub Main()
|
||||
|
||||
Dim sEnv As String
|
||||
|
||||
For Each sEnv In Env
|
||||
Print sEnv; "="; Env[sEnv]
|
||||
Next
|
||||
|
||||
End
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FGridView
|
||||
MMain
|
||||
gb.gui.base
|
||||
0
|
||||
0
|
||||
|
|
Loading…
Reference in a new issue