[GB.GUI.BASE]
* BUG: ScrollArea: The corner widget is now correctly hidden in all cases. * BUG: GridView: Picture alignment inside cells is now correct. git-svn-id: svn://localhost/gambas/trunk@7128 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
ad1a19d35a
commit
acc5dfb4ba
7 changed files with 43 additions and 74 deletions
Binary file not shown.
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 2.9 KiB |
|
@ -1,12 +1,13 @@
|
|||
# Gambas Project File 3.0
|
||||
# Compiled with Gambas 3.7.90
|
||||
Title=gb.gui.base
|
||||
Startup=FGridView
|
||||
Startup=FMain
|
||||
Version=3.7.90
|
||||
VersionFile=1
|
||||
Component=gb.image
|
||||
Component=gb.gui
|
||||
Environment="GB_GUI=gb.qt5\nLIBOVERLAY_SCROLLBAR=0"
|
||||
TabSize=2
|
||||
Language=fr
|
||||
Type=Component
|
||||
Packager=1
|
||||
|
|
|
@ -185,15 +185,15 @@ End
|
|||
Private Sub DrawAlignedPicture(hPict As Picture, X As Integer, Y As Integer, W As Integer, H As Integer, A As Integer)
|
||||
|
||||
If Align.IsBottom(A) Then
|
||||
Y = H - hPict.H
|
||||
Y += H - hPict.H
|
||||
Else If Align.IsMiddle(A) Then
|
||||
Y = Y + (H - hPict.H) / 2
|
||||
Y += (H - hPict.H) / 2
|
||||
Endif
|
||||
|
||||
If Align.IsRight(A) Then
|
||||
X = W - hPict.W
|
||||
X += W - hPict.W
|
||||
Else If Align.IsCenter(A) Then
|
||||
X = X + (W - hPict.W) / 2
|
||||
X += (W - hPict.W) / 2
|
||||
Endif
|
||||
|
||||
Paint.DrawPicture(hPict, X, Y)
|
||||
|
|
|
@ -111,6 +111,7 @@ Public Sub _new()
|
|||
$hVBar.Step = Desktop.Scale
|
||||
|
||||
$hCorner = New DrawingArea(Me)
|
||||
$hCorner.Hide
|
||||
|
||||
Me.Proxy = $hDrawingArea
|
||||
Me._Container = $hDrawingArea
|
||||
|
@ -294,6 +295,9 @@ RETRY:
|
|||
|
||||
If $bHBarVisible And If $bVBarVisible Then
|
||||
$hCorner.Move($hVBar.X, $hHBar.Y, SB, SB)
|
||||
$hCorner.Show
|
||||
Else
|
||||
$hCorner.Hide
|
||||
Endif
|
||||
|
||||
$bNoArrange = False
|
||||
|
|
|
@ -1,21 +1,35 @@
|
|||
' Gambas class file
|
||||
|
||||
Public Sub _new()
|
||||
|
||||
End
|
||||
|
||||
Public Sub Form_Open()
|
||||
|
||||
HSplit1.Layout = [1, 1]
|
||||
|
||||
End
|
||||
|
||||
Public Sub Button1_Click()
|
||||
|
||||
TextArea1.Visible = Not TextArea1.Visible
|
||||
|
||||
End
|
||||
|
||||
Public Sub Form_Close()
|
||||
|
||||
Debug String[](HSplit1.Layout).Join(",")
|
||||
|
||||
|
||||
' GridView test
|
||||
GridView1.Columns.Count = 3
|
||||
GridView1.Rows.Count = 1
|
||||
GridView1.Columns.Width = GridView1.Width
|
||||
GridView1.Rows[0].Height = 52
|
||||
'GridView1.Rows[0].Height = GridView1.Height
|
||||
GridView1[0, 0].Picture = Picture["pattern/14.png"]
|
||||
GridView1[0, 1].Picture = Picture["pattern/14.png"]
|
||||
GridView1[0, 2].Picture = Picture["pattern/14.png"]
|
||||
'' Good
|
||||
GridView1[0, 0].Alignment = Align.Center
|
||||
GridView1[0, 1].Alignment = Align.Center
|
||||
GridView1[0, 2].Alignment = Align.Center
|
||||
|
||||
GridView1[0, 0].Alignment = Align.Left
|
||||
GridView1[0, 1].Alignment = Align.Left
|
||||
GridView1[0, 2].Alignment = Align.Left
|
||||
'' No Good
|
||||
' GridView1[0, 0].Alignment = Align.Right
|
||||
' GridView1[0, 1].Alignment = Align.Right
|
||||
' GridView1[0, 2].Alignment = Align.Right
|
||||
|
||||
' GridView1[0, 0].Alignment = Align.TopRight
|
||||
' GridView1[0, 1].Alignment = Align.TopRight
|
||||
' GridView1[0, 2].Alignment = Align.TopRight
|
||||
|
||||
End
|
||||
|
|
|
@ -1,58 +1,8 @@
|
|||
# Gambas Form File 3.0
|
||||
|
||||
{ Form Form
|
||||
MoveScaled(0,0,82,59)
|
||||
Arrangement = Arrange.Vertical
|
||||
{ HBox1 HBox
|
||||
MoveScaled(2,1,70,4)
|
||||
{ Button1 Button
|
||||
MoveScaled(0,0,16,4)
|
||||
Text = ("Button1")
|
||||
}
|
||||
}
|
||||
{ HBox2 HBox
|
||||
MoveScaled(2,7,73,4)
|
||||
{ CheckBox1 CheckBox
|
||||
MoveScaled(1,1,20,3)
|
||||
Action = "test"
|
||||
}
|
||||
{ CheckBox2 CheckBox
|
||||
MoveScaled(22,1,20,3)
|
||||
Action = "check"
|
||||
}
|
||||
{ ToggleButton1 ToggleButton
|
||||
MoveScaled(42,0,19,4)
|
||||
Action = "test"
|
||||
}
|
||||
}
|
||||
{ HSplit1 HSplit
|
||||
MoveScaled(4,12,68,40)
|
||||
Expand = True
|
||||
Border = False
|
||||
{ TextArea1 TextArea
|
||||
MoveScaled(5,8,16,16)
|
||||
Text = ("TextArea1")
|
||||
}
|
||||
{ TextArea2 TextArea
|
||||
MoveScaled(26,14,16,16)
|
||||
Text = ("TextArea2")
|
||||
}
|
||||
{ TextArea3 TextArea
|
||||
MoveScaled(43,11,16,16)
|
||||
Text = ("TextArea3")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
# Gambas Action File 3.0
|
||||
|
||||
{ Actions
|
||||
{ Action check
|
||||
Text = ""
|
||||
Picture = "$CheckBox"
|
||||
}
|
||||
{ Action test
|
||||
Text = ""
|
||||
Picture = "$CheckBox"
|
||||
MoveScaled(0,0,50,50)
|
||||
{ GridView1 GridView
|
||||
MoveScaled(3,12,33,18)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
FGridView
|
||||
FMain
|
||||
gb.gui.base
|
||||
0
|
||||
0
|
||||
|
|
Loading…
Reference in a new issue