Compute prefered column width correctly and fix top-level menus initialization routine.

[GB.GUI.BASE]
* BUG: Top-level menus initialization routine takes invalid menus into account now.
* BUG: GridView: Compute prefered column width correctly.
This commit is contained in:
gambas 2019-06-14 00:55:22 +02:00
parent ce37d6ff67
commit d9858d07af
2 changed files with 2 additions and 1 deletions

View file

@ -2077,7 +2077,7 @@ Public Sub _GetPreferredWidth(iCol As Integer) As Integer
Dim bBusy As Boolean
Dim J As Integer
PW = Me.Font.TextWidth($hColumns[iCol].Text) + $iPadding * 2 + If($bSorted, 16, 0)
PW = Me.Font.TextWidth($hColumns[iCol].Text) + Max(Desktop.Scale \ 2, $iPadding) * 2 + If($bSorted, 16, 0) + 2
fTime = Timer

View file

@ -107,6 +107,7 @@ Static Public Sub _InitMenuBarShortcut(hWindow As Window)
For Each hMenu In hWindow.Menus
If Not Object.IsValid(hMenu) Then Continue
If Not hMenu.Text Then Continue
If bVisible Then