mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-16 18:09:23 +02:00
LCL/gtk3: Fix tiny font sizes in some specific cases. Issue #40358, patch by Anton Kavalenka.
This commit is contained in:
parent
d3386f4a73
commit
051c6c7065
@ -1985,6 +1985,8 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TGtk3WidgetSet.GetDeviceCaps(DC: HDC; Index: Integer): Integer;
|
function TGtk3WidgetSet.GetDeviceCaps(DC: HDC; Index: Integer): Integer;
|
||||||
|
var
|
||||||
|
pscr: PGdkScreen;
|
||||||
begin
|
begin
|
||||||
{$IFDEF GTK3DEBUGNOTIMPLEMENTED}
|
{$IFDEF GTK3DEBUGNOTIMPLEMENTED}
|
||||||
if (Index <> BITSPIXEL) and (Index <> LOGPIXELSX) and (Index <> LOGPIXELSY) then
|
if (Index <> BITSPIXEL) and (Index <> LOGPIXELSX) and (Index <> LOGPIXELSY) then
|
||||||
@ -2028,14 +2030,11 @@ begin
|
|||||||
end;
|
end;
|
||||||
PLANES: Result := 1;
|
PLANES: Result := 1;
|
||||||
SIZEPALETTE: Result := gdk_window_get_visual(gdk_get_default_root_window)^.get_colormap_size;
|
SIZEPALETTE: Result := gdk_window_get_visual(gdk_get_default_root_window)^.get_colormap_size;
|
||||||
LOGPIXELSX : { Logical pixels per inch in X }
|
|
||||||
begin
|
|
||||||
Result := LazUtilities.RoundToInt(gdk_screen_width / (gdk_screen_width_mm / 25.4));
|
|
||||||
end;
|
|
||||||
|
|
||||||
LOGPIXELSY : { Logical pixels per inch in Y }
|
LOGPIXELSX, LOGPIXELSY : { Logical pixels per inch in X and Y }
|
||||||
begin
|
begin
|
||||||
Result := LazUtilities.RoundToInt(gdk_screen_height / (gdk_screen_height_mm / 25.4));
|
pscr := TGdkScreen.get_default;
|
||||||
|
Result := round(pscr^.get_resolution);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user