qt: fix Frame3D drawing:

- decrease rect always even if we draw with bvNone (consistent behavior with carbon and gtk)
 - improve drawing of Frame3D with bvLowered, bvRaised

git-svn-id: trunk@18802 -
This commit is contained in:
paul 2009-02-23 08:18:54 +00:00
parent b260e0bc7d
commit 9f70078354
2 changed files with 6 additions and 4 deletions

View File

@ -1919,7 +1919,7 @@ begin
Palette := QWidget_palette(Parent);
// since q_DrawWinPanel doesnot supports lineWidth we should do it ourself
for i := 1 to lineWidth - 1 do
for i := 1 to lineWidth - 2 do
begin
q_DrawWinPanel(Widget, x, y, w, h, Palette, Sunken);
inc(x);
@ -1927,7 +1927,10 @@ begin
dec(w, 2);
dec(h, 2);
end;
q_DrawWinPanel(Widget, x, y, w, h, Palette, Sunken, FillBrush);
if lineWidth > 1 then
q_DrawWinPanel(Widget, x, y, w, h, Palette, Sunken, FillBrush)
else
q_DrawShadePanel(Widget, x, y, w, h, Palette, Sunken, 1, FillBrush);
end;
{------------------------------------------------------------------------------

View File

@ -1753,8 +1753,7 @@ begin
ARect.Right - ARect.Left, ARect.Bottom - ARect.Top, nil, FrameWidth);
end;
if Style <> bvNone then
InflateRect(ARect, -FrameWidth, -FrameWidth);
InflateRect(ARect, -FrameWidth, -FrameWidth);
Result := True;
end;