MenuButton: Fix its behaviour for GTK+3.

[GB.FORM]
* BUG: MenuButton: Fix draing for GTK+3.
* BUG: MenuButton: Fix hidden shortcut button for GTK+3.
This commit is contained in:
gambas 2020-11-22 19:43:44 +01:00
parent 6b26a77adb
commit dd664de989

View File

@ -99,7 +99,8 @@ Private Sub Text_Write(Value As String)
$hButton.Ignore = True
$hButton.Border = False
S = Desktop.Scale * 3
$hButton.Move(0, -S, S, S)
$hButton.Move(0, 0, S, S)
$hButton.Lower()
Endif
$hButton.Text = String.Mid$($sText, iPos, 2)
$iShortcutPos = iPos
@ -430,10 +431,13 @@ Public Sub DrawingArea_Draw()
If bMenu Then
Paint.FillRect(1, 1, Me.W - 2, Me.H - 2, Color.SelectedBackground)
Else If $bInsideArrow Or If $bMenuOnly Then
Style.PaintButton(0, 0, Me.W, Me.H, False, iFlag, bFlat)
Else
Style.PaintButton(0, 0, Me.W, Me.H, $bPressed, iFlag, bFlat)
Else
Paint.FillRect(1, 1, Me.W - 2, Me.H - 2, Color.Background)
If $bInsideArrow Or If $bMenuOnly Then
Style.PaintButton(0, 0, Me.W, Me.H, False, iFlag, bFlat)
Else
Style.PaintButton(0, 0, Me.W, Me.H, $bPressed, iFlag, bFlat)
Endif
Endif
If $hPicture Then