mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 17:40:40 +02:00
gtk: fill interior with btnface color in DrawEdge
git-svn-id: trunk@23269 -
This commit is contained in:
parent
651640edd0
commit
6b7d886771
@ -2843,7 +2843,7 @@ var
|
|||||||
|
|
||||||
var
|
var
|
||||||
InnerTL, OuterTL,
|
InnerTL, OuterTL,
|
||||||
InnerBR, OuterBR: TGDKColor;
|
InnerBR, OuterBR, MiddleColor: TGDKColor;
|
||||||
BInner, BOuter: Boolean;
|
BInner, BOuter: Boolean;
|
||||||
Width, Height: Integer;
|
Width, Height: Integer;
|
||||||
R: TRect;
|
R: TRect;
|
||||||
@ -2914,17 +2914,12 @@ begin
|
|||||||
// gdk_colormap_free_colors(gdk_colormap_get_system, @InnerBR, 1);
|
// gdk_colormap_free_colors(gdk_colormap_get_system, @InnerBR, 1);
|
||||||
|
|
||||||
//Draw interiour
|
//Draw interiour
|
||||||
if ((grfFlags and BF_MIDDLE) = BF_MIDDLE) and not IsNullBrush
|
if ((grfFlags and BF_MIDDLE) = BF_MIDDLE) then
|
||||||
then begin
|
begin
|
||||||
Width := R.Right - R.Left + 1;
|
Width := R.Right - R.Left + 1;
|
||||||
Height := R.Bottom - R.Top + 1;
|
Height := R.Bottom - R.Top + 1;
|
||||||
SelectBrushProps;
|
MiddleColor := AllocGDKColor(GetSysColor(COLOR_BTNFACE));
|
||||||
if (GetBrush^.GDIBrushFill = GDK_SOLID)
|
gdk_gc_set_foreground(GC, @MiddleColor);
|
||||||
and (IsBackgroundColor(TColor(GetBrush^.GDIBrushColor.ColorRef)))
|
|
||||||
then
|
|
||||||
StyleFillRectangle(Drawable, GC, GetBrush^.GDIBrushColor.ColorRef,
|
|
||||||
R.Left, R.Top, Width, Height)
|
|
||||||
else
|
|
||||||
gdk_draw_rectangle(Drawable, GC, 1, R.Left, R.Top, Width, Height);
|
gdk_draw_rectangle(Drawable, GC, 1, R.Left, R.Top, Width, Height);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user