Commit 9b9cd35a authored by Benoît Minisini's avatar Benoît Minisini
Browse files

Report editor: Fix CoordBox control for GTK+3.

[DEVELOPMENT ENVIRONMENT]
* BUG: Report editor: Use Style.FrameWidth for the padding of CoordBox, so that the control is usable with GTK+3.
* BUG: Report editor: Fix drawing of CoordBox background.
parent 6ec0f690
Pipeline #366139775 passed with stage
in 26 minutes and 19 seconds
......@@ -31,7 +31,7 @@ Component=gb.signal
Description="Integrated Development Environment for Gambas"
Authors="Benoît Minisini\nFabien Bodard\nCharlie Reinl\nJosé Luis Redrejo\nRobert Rowe\nTobias Boege"
Arguments=[["-L"],["-t","/home/benoit/gambas/git/master/app/src/gambas3"],["--help"]]
Environment="GB_GUI=gb.qt5\n GTK_DEBUG=interactive\nGB_NO_JIT=1"
Environment="GB_GUI=gb.gtk3\n GTK_DEBUG=interactive\nGB_NO_JIT=1"
TabSize=2
Translate=1
Language=en
......
......@@ -1137,7 +1137,7 @@ Public Sub gvwMenu_Draw(X As Integer, Y As Integer, Width As Integer, Height As
X += D
Width -= D
Paint.Font.Italic = True
Paint.FillRect(X, Y + Height / 2, Paint.TextSize(sText).Width, 1, If(Row = gvwMenu.Row, Color.SelectedBackground, Color.TextBackground))
Paint.FillRect(X, Y + Height / 2, Paint.TextSize(sText).Width, 1, If(Row = gvwMenu.Row, Color.LightBackground, Color.TextBackground))
Else
......@@ -1183,7 +1183,7 @@ Public Sub gvwMenu_Data(Row As Integer, Column As Integer)
gvwMenu.Data.Foreground = GetMenuColor($aMenu[Row])
If Row = gvwMenu.Row Then gvwMenu.Data.Background = Color.SelectedBackground
If Row = gvwMenu.Row Then gvwMenu.Data.Background = Color.LightBackground
If .Level = 0 Then
gvwMenu.Data.Font.Bold = True
......
......@@ -95,7 +95,6 @@ Public Sub Form_Open()
'tvwProject_LostFocus
frmWelcome = New FWelcome(dwgWelcome)
frmWelcome.Hide
Project.UseInheritance = Settings["/UseInheritance", True]
btnUseInheritance.Value = Project.UseInheritance
......@@ -104,10 +103,10 @@ Public Sub Form_Open()
End
Public Sub Welcome()
Public Sub HideWelcome()
frmWelcome.Show
dwgWelcome.Refresh
frmWelcome.Hide
'dwgWelcome.Refresh
End
......
......@@ -1397,6 +1397,7 @@
}
{ panProperty SidePanel
MoveScaled(97,1,32,65)
Visible = False
ToolTip = ("Properties")
Arrangement = Arrange.Vertical
Action = "property"
......
......@@ -170,25 +170,35 @@ End
Private Sub Border_Write(Value As Boolean)
$bBorder = Value
$hBackground.Padding = If(Value, Style.TextBoxFrameWidth, 0)
$hBackground.Padding = If(Value, Style.FrameWidth, 0)
Me.Refresh
End
Public Sub Background_Draw()
Dim iBg As Integer = Color.TextBackground
Dim iCol As Integer
Dim iState As Integer
If Me.Background <> Color.Default Then iBg = Me.Background
iCol = Style.BackgroundOf($hTextBox)
If $bBorder Then
Style.PaintBox(0, 0, Me.W, Me.H, Style.StateOf($hTextBox), iBg)
If $bBorder Then
iState = Style.StateOf($hBackground)
If $hTextBox.HasFocus Then iState = iState Or Style.HasFocus
If $hBackground.Hovered Then iState = iState Or Style.Hovered
Style.PaintBox(0, 0, Paint.W, Paint.H, iState, iCol)
Else
Paint.FillRect(0, 0, Me.W, Me.H, iBg)
Paint.FillRect(0, 0, Paint.W, Paint.H, iCol)
Endif
End
Private Function Editor_Read() As MaskBox
Return $hTextBox
......
......@@ -426,7 +426,9 @@ Public Sub Main()
FMain.Show
If sPath Then
If File.IsRelative(sPath) Then sPath = Application.Dir &/ sPath
If IsDir(sPath) Then
Project.Open(sPath)
For Each sPath In aOpenFile
......@@ -437,17 +439,19 @@ Public Sub Main()
Else
FMain.ShowWarning(("File not found!") & "\n\n<tt>" & sPath & "</tt>")
Endif
If Not Project.Dir Then
FMain.Close
Dec Application.Busy
Return
Endif
FMain.HideWelcome
Endif
RefreshActivate
If Not sPath Then FMain.Welcome
Dec Application.Busy
If Settings["/ShowTipOnStartup", True] Then
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment