Merge branch 'master' of https://gitlab.com/gambas/gambas into after-make-exe

This commit is contained in:
Bruce Steers 2021-02-16 03:36:41 +00:00
commit b8f30e84f1
4 changed files with 11 additions and 5 deletions

View file

@ -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"
Environment="GB_GUI=gb.gtk3\n GTK_DEBUG=interactive"
TabSize=2
Translate=1
Language=en

View file

@ -112,7 +112,7 @@
MoveScaled(34,11,0,21)
}
{ VBox3 VBox
MoveScaled(41,1,64,59)
MoveScaled(41,1,63,59)
Spacing = True
Margin = True
{ lblCreate Label
@ -179,9 +179,8 @@
Text = "Shortcut"
}
{ HBox3 HBox
MoveScaled(14,21,42,4)
MoveScaled(14,21,44,4)
Expand = True
Spacing = True
{ chkCtrl CheckBox
MoveScaled(0,0,10,4)
#Translate = False

View file

@ -115,6 +115,8 @@ Static Public Sub GetInfo() As String[]
aText.Add("Architecture=" & System.Architecture)
aText.Add("Distribution=" & GetDistribution())
aText.Add("Desktop=" & Desktop.Type)
aText.Add("Font=" & Application.Font.ToString())
aText.Add("Scale=" & Desktop.Scale)
aText.Add("Theme=" & Style.Name)
aText.Add("Language=" & System.Language)

View file

@ -609,7 +609,12 @@ int gFont::height(const char *text, int len)
int gFont::height()
{
if (!_height)
_height = gt_pango_to_pixel(pango_font_metrics_get_height(metrics()));
{
float h1, h2;
textSize("A\nA", 3, NULL, &h1);
textSize("A\nA\nA", 5, NULL, &h2);
_height = gt_pango_to_pixel((h2 - h1) * PANGO_SCALE);
}
return _height;
}