mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-06 16:25:59 +02:00
Gtk2: Allow font change for TListView. Fixed issue #16964
git-svn-id: trunk@28444 -
This commit is contained in:
parent
6ded956938
commit
da7a65635c
@ -147,6 +147,7 @@ type
|
|||||||
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); override;
|
class procedure SetAllocBy(const ALV: TCustomListView; const AValue: Integer); override;
|
||||||
class procedure SetColor(const AWinControl: TWinControl); override;
|
class procedure SetColor(const AWinControl: TWinControl); override;
|
||||||
class procedure SetDefaultItemHeight(const ALV: TCustomListView; const AValue: Integer); override;
|
class procedure SetDefaultItemHeight(const ALV: TCustomListView; const AValue: Integer); override;
|
||||||
|
class procedure SetFont(const AWinControl: TWinControl; const AFont: TFont); override;
|
||||||
class procedure SetHotTrackStyles(const ALV: TCustomListView; const AValue: TListHotTrackStyles); override;
|
class procedure SetHotTrackStyles(const ALV: TCustomListView; const AValue: TListHotTrackStyles); override;
|
||||||
class procedure SetHoverTime(const ALV: TCustomListView; const AValue: Integer); override;
|
class procedure SetHoverTime(const ALV: TCustomListView; const AValue: Integer); override;
|
||||||
// class procedure SetIconOptions(const ALV: TCustomListView; const AValue: TIconOptions); override;
|
// class procedure SetIconOptions(const ALV: TCustomListView; const AValue: TIconOptions); override;
|
||||||
|
@ -1815,6 +1815,22 @@ begin
|
|||||||
then Exit;
|
then Exit;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
class procedure TGtk2WSCustomListView.SetFont(const AWinControl: TWinControl;
|
||||||
|
const AFont: TFont);
|
||||||
|
var
|
||||||
|
Widget: PGtkWidget;
|
||||||
|
begin
|
||||||
|
if not WSCheckHandleAllocated(AWinControl, 'SetFont') then
|
||||||
|
Exit;
|
||||||
|
Widget := PGtkWidget(AWinControl.Handle);
|
||||||
|
Widget := GetWidgetInfo(Widget, True)^.CoreWidget;
|
||||||
|
Gtk2WidgetSet.SetWidgetFont(Widget, AFont);
|
||||||
|
Gtk2WidgetSet.SetWidgetColor(Widget, AFont.Color, clNone,
|
||||||
|
[GTK_STATE_NORMAL,GTK_STATE_ACTIVE,
|
||||||
|
GTK_STATE_PRELIGHT,GTK_STATE_SELECTED,
|
||||||
|
GTK_STYLE_TEXT]);
|
||||||
|
end;
|
||||||
|
|
||||||
class procedure TGtk2WSCustomListView.SetHotTrackStyles(const ALV: TCustomListView;
|
class procedure TGtk2WSCustomListView.SetHotTrackStyles(const ALV: TCustomListView;
|
||||||
const AValue: TListHotTrackStyles);
|
const AValue: TListHotTrackStyles);
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user