mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-07 08:56:02 +02:00
parent
45c85c3a98
commit
8c2e23e096
@ -1930,8 +1930,13 @@ begin
|
||||
end;
|
||||
if lineWidth > 1 then
|
||||
q_DrawWinPanel(Widget, x, y, w, h, Palette, Sunken, FillBrush)
|
||||
else
|
||||
begin
|
||||
if FillBrush = nil then
|
||||
q_DrawShadePanel(Widget, x, y, w, h, Palette, Sunken, 1, QPalette_background(Palette))
|
||||
else
|
||||
q_DrawShadePanel(Widget, x, y, w, h, Palette, Sunken, 1, FillBrush);
|
||||
end;
|
||||
end;
|
||||
|
||||
{------------------------------------------------------------------------------
|
||||
|
@ -114,9 +114,17 @@ var
|
||||
Element: TQtDrawElement;
|
||||
Features: QStyleOptionButtonButtonFeatures;
|
||||
Position: QStyleOptionHeaderSectionPosition;
|
||||
Palette: QPaletteH;
|
||||
begin
|
||||
if (Context <> nil) then
|
||||
begin
|
||||
Context.save;
|
||||
try
|
||||
if Context.Parent <> nil then
|
||||
begin
|
||||
Palette := QWidget_palette(Context.Parent);
|
||||
QPainter_setBackground(Context.Widget, QPalette_background(Palette));
|
||||
end;
|
||||
ARect := R;
|
||||
Element := GetDrawElement(Details);
|
||||
case Element.DrawVariant of
|
||||
@ -155,7 +163,6 @@ begin
|
||||
end;
|
||||
qdvComplexControl:
|
||||
begin
|
||||
Context.save;
|
||||
case Element.ComplexControl of
|
||||
QStyleCC_ToolButton: opt := QStyleOptionToolButton_create();
|
||||
|
||||
@ -184,7 +191,6 @@ begin
|
||||
QStyleOption_setRect(opt, @ARect);
|
||||
QStyle_drawComplexControl(Style, Element.ComplexControl, QStyleOptionComplexH(opt), Context.Widget);
|
||||
QStyleOption_Destroy(opt);
|
||||
Context.restore;
|
||||
end;
|
||||
qdvPrimitive:
|
||||
begin
|
||||
@ -211,6 +217,9 @@ begin
|
||||
QStyleOption_Destroy(opt);
|
||||
end;
|
||||
end;
|
||||
finally
|
||||
Context.restore;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user