mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 23:46:28 +02:00
GTK3: Updated Pango1 unit generated with new gir2pas version.
Commented manually calls to API not present on Debian 11.
This commit is contained in:
parent
b0aa7ba6ea
commit
fa757938da
File diff suppressed because it is too large
Load Diff
@ -680,21 +680,21 @@ begin
|
||||
if not Assigned(fHandle) then exit;
|
||||
fillchar(fLogFont,sizeof(fLogFont),0);
|
||||
members:=fHandle^.get_set_fields;
|
||||
if (PANGO_FONT_MASK_FAMILY and members<>0) then
|
||||
if PANGO_FONT_MASK_FAMILY in members then
|
||||
begin
|
||||
fLogFont.lfFaceName:=PChar(fHandle^.get_family);
|
||||
end;
|
||||
if (PANGO_FONT_MASK_STYLE and members<>0) then
|
||||
if PANGO_FONT_MASK_STYLE in members then
|
||||
begin
|
||||
AStyle := fHandle^.get_style;
|
||||
if AStyle = PANGO_STYLE_ITALIC then
|
||||
fLogFont.lfItalic:=1;
|
||||
end;
|
||||
if (PANGO_FONT_MASK_WEIGHT and members<>0) then
|
||||
if PANGO_FONT_MASK_WEIGHT in members then
|
||||
begin
|
||||
fLogFont.lfWeight:=fHandle^.get_weight();
|
||||
fLogFont.lfWeight := Integer(fHandle^.get_weight());
|
||||
end;
|
||||
if (PANGO_FONT_MASK_GRAVITY and members<>0) then
|
||||
if PANGO_FONT_MASK_GRAVITY in members then
|
||||
begin
|
||||
AGravity := fHandle^.get_gravity;
|
||||
if AGravity = PANGO_GRAVITY_SOUTH then
|
||||
@ -709,7 +709,7 @@ begin
|
||||
if AGravity = PANGO_GRAVITY_WEST then
|
||||
fLogFont.lfOrientation := 2700;
|
||||
end;
|
||||
if (PANGO_FONT_MASK_SIZE and members<>0) then
|
||||
if PANGO_FONT_MASK_SIZE in members then
|
||||
begin
|
||||
sz:=fHandle^.get_size;
|
||||
if fHandle^.get_size_is_absolute then
|
||||
@ -785,7 +785,7 @@ begin
|
||||
FHandle^.set_absolute_size(Abs(ALogFont.lfHeight) * PANGO_SCALE);
|
||||
if ALogFont.lfItalic > 0 then
|
||||
FHandle^.set_style(PANGO_STYLE_ITALIC);
|
||||
FHandle^.set_weight(ALogFont.lfWeight);
|
||||
FHandle^.set_weight(TPangoWeight(ALogFont.lfWeight));
|
||||
FLayout := pango_layout_new(AContext);
|
||||
FLayout^.set_font_description(FHandle);
|
||||
|
||||
@ -2151,7 +2151,7 @@ begin
|
||||
GTK_STATE_FLAG_DIR_LTR: TGtkStateFlags = 128;
|
||||
GTK_STATE_FLAG_DIR_RTL: TGtkStateFlags = 256;
|
||||
}
|
||||
gtk_style_context_set_state (context, TGtkStateFlags(Ord(GTK_STATE_FLAG_FOCUSED) or Ord(GTK_STATE_FLAG_PRELIGHT)));
|
||||
gtk_style_context_set_state (context, TGtkStateFlags(Integer(GTK_STATE_FLAG_FOCUSED) or Integer(GTK_STATE_FLAG_PRELIGHT)));
|
||||
|
||||
pw:=w;
|
||||
while Assigned(pw) do
|
||||
|
@ -1231,13 +1231,13 @@ var
|
||||
ALogFontA.lfItalic := Byte(FontStyle = PANGO_STYLE_ITALIC);
|
||||
|
||||
// keep newer pango compat to LCL
|
||||
if FontWeight = 380 {PANGO_WEIGHT_BOOK as of pango 1.24} then
|
||||
if FontWeight = PANGO_WEIGHT_BOOK {380 as of pango 1.24} then
|
||||
FontWeight := PANGO_WEIGHT_NORMAL
|
||||
else
|
||||
if FontWeight = 1000 {PANGO_WEIGHT_ULTRAHEAVY as of pango 1.24} then
|
||||
if FontWeight = PANGO_WEIGHT_ULTRAHEAVY {1000 as of pango 1.24} then
|
||||
FontWeight := PANGO_WEIGHT_HEAVY;
|
||||
|
||||
ALogFontA.lfWeight := FontWeight;
|
||||
ALogFontA.lfWeight := Integer(FontWeight);
|
||||
|
||||
ALogFontA.lfHeight := pango_font_description_get_size(Font);
|
||||
if not pango_font_description_get_size_is_absolute(Font) then
|
||||
@ -2670,7 +2670,7 @@ begin
|
||||
if APangoWeight > PANGO_WEIGHT_HEAVY then
|
||||
APangoWeight := PANGO_WEIGHT_HEAVY;
|
||||
|
||||
TM.tmWeight := APangoWeight;
|
||||
TM.tmWeight := Integer(APangoWeight);
|
||||
|
||||
TM.tmFirstChar := 'a';
|
||||
TM.tmLastChar := 'z';
|
||||
|
Loading…
Reference in New Issue
Block a user