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