mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-05-31 04:32:30 +02:00
Gtk2: Gtk2Themes: return correct size value for checkbox and radiobutton
git-svn-id: trunk@43174 -
This commit is contained in:
parent
3019dd8e23
commit
0a07967377
@ -560,14 +560,23 @@ function TGtk2ThemeServices.GetDetailSize(Details: TThemedElementDetails): TSize
|
||||
var
|
||||
AValue: TGValue;
|
||||
begin
|
||||
if (Details.Element = teTreeView) and (Details.Part in [TVP_GLYPH, TVP_HOTGLYPH]) then
|
||||
if (Details.Element = teTreeView) and (Byte(Details.Part) in [TVP_GLYPH, TVP_HOTGLYPH]) then
|
||||
begin
|
||||
FillChar(AValue{%H-}, SizeOf(AValue), 0);
|
||||
g_value_init(@AValue, G_TYPE_INT);
|
||||
gtk_widget_style_get_property(GetStyleWidget(lgsTreeView), 'expander-size', @AValue);
|
||||
Result := Size(AValue.data[0].v_int, AValue.data[0].v_int);
|
||||
end
|
||||
else
|
||||
end else
|
||||
if (Details.Element = teButton) and (Byte(Details.Part) in [BP_CHECKBOX, BP_RADIOBUTTON]) then
|
||||
begin
|
||||
FillChar(AValue{%H-}, SizeOf(AValue), 0);
|
||||
g_value_init(@AValue, G_TYPE_INT);
|
||||
if Details.Part = BP_CHECKBOX then
|
||||
gtk_widget_style_get_property(GetStyleWidget(lgsCheckbox),'indicator-size', @AValue)
|
||||
else
|
||||
gtk_widget_style_get_property(GetStyleWidget(lgsRadioButton),'indicator-size', @AValue);
|
||||
Result := Size(AValue.data[0].v_int, AValue.data[0].v_int);
|
||||
end else
|
||||
Result := GetBaseDetailsSize(Details);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user