mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-08-11 22:03:09 -06:00
One more painting fix (left tab image was stretched too much)
git-svn-id: svn://ultimatepp.org/upp/trunk@1150 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
50e73305af
commit
7779eed722
1 changed files with 5 additions and 5 deletions
|
|
@ -535,7 +535,7 @@ Value TabBar::AlignValue(int align, const Value &v, const Size &isz)
|
|||
case AlignedFrame::LEFT:
|
||||
temp = RotateAntiClockwise(temp);
|
||||
img = temp; // GCC
|
||||
img.SetHotSpot(Point(1, 5));
|
||||
img.SetHotSpot(Point(10, 10));
|
||||
img.Set2ndSpot(Point(isz.cy / 2, isz.cx / 2));
|
||||
break;
|
||||
case AlignedFrame::RIGHT:
|
||||
|
|
@ -613,23 +613,23 @@ Point TabBar::GetImagePosition(const Rect& r, int cx, int cy, int space, int sid
|
|||
|
||||
if (align == LEFT)
|
||||
{
|
||||
p.x = r.left + (r.GetWidth() - cy) / 2;
|
||||
p.x = r.left + (r.GetWidth() - cy) / 2 + 1;
|
||||
p.y = side == LEFT ? r.bottom - space - cx : r.top + space;
|
||||
}
|
||||
else if (align == RIGHT)
|
||||
{
|
||||
p.x = r.right - (r.GetWidth() + cy) / 2;
|
||||
p.x = r.right - (r.GetWidth() + cy) / 2 - 1;
|
||||
p.y = side == LEFT ? r.top + space : r.bottom - space - cx;
|
||||
}
|
||||
else if (align == TOP)
|
||||
{
|
||||
p.x = side == LEFT ? r.left + space : r.right - cx - space;
|
||||
p.y = r.top + (r.GetHeight() - cy) / 2;
|
||||
p.y = r.top + (r.GetHeight() - cy) / 2 + 1;
|
||||
}
|
||||
else if (align == BOTTOM)
|
||||
{
|
||||
p.x = side == LEFT ? r.left + space : r.right - cx - space;
|
||||
p.y = r.bottom - (r.GetHeight() + cy) / 2;
|
||||
p.y = r.bottom - (r.GetHeight() + cy) / 2 - 1;
|
||||
}
|
||||
return p;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue