mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
IconDes: Fixed hotspot issue
git-svn-id: svn://ultimatepp.org/upp/trunk@13993 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
2cc8a169e2
commit
c1fdbcd595
1 changed files with 10 additions and 1 deletions
|
|
@ -88,7 +88,7 @@ void IconDes::PrepareImageDlg(WithImageLayout<TopWindow>& dlg)
|
|||
dlg.uhd <<= !!(flags & IML_IMAGE_FLAG_UHD);
|
||||
dlg.dark <<= !!(flags & IML_IMAGE_FLAG_DARK);
|
||||
|
||||
dlg.uhd ^= dlg.dark ^= dlg.exp ^= dlg.fixed_colors ^= dlg.fixed_size ^= dlg.fixed ^=
|
||||
dlg.uhd ^= dlg.dark ^= dlg.exp ^= dlg.fixed_colors ^= dlg.fixed_size ^= dlg.fixed ^= dlg.name ^=
|
||||
[&] { dlg.Break(-1000); };
|
||||
}
|
||||
dlg.name.SetFilter(sCharFilterCid);
|
||||
|
|
@ -419,6 +419,10 @@ void IconDes::EditImage()
|
|||
dlg.Breaker(dlg.cx);
|
||||
dlg.Breaker(dlg.cy);
|
||||
Image img = c.image;
|
||||
dword flags = c.flags;
|
||||
bool exp = c.exp;
|
||||
String name = c.name;
|
||||
|
||||
dlg.cx <<= img.GetWidth();
|
||||
dlg.cy <<= img.GetHeight();
|
||||
dlg.name <<= c.name;
|
||||
|
|
@ -428,6 +432,9 @@ void IconDes::EditImage()
|
|||
switch(dlg.Run()) {
|
||||
case IDCANCEL:
|
||||
c.image = img;
|
||||
c.flags = flags;
|
||||
c.exp = exp;
|
||||
c.name = name;
|
||||
Reset();
|
||||
return;
|
||||
case IDOK:
|
||||
|
|
@ -443,10 +450,12 @@ void IconDes::EditImage()
|
|||
return;
|
||||
}
|
||||
}
|
||||
c.name = ~dlg.name;
|
||||
c.flags = GetFlags(dlg);
|
||||
c.image = CreateImage(Size(minmax((int)~dlg.cx, 1, 8192), minmax((int)~dlg.cy, 1, 8192)), Null);
|
||||
c.exp = ~dlg.exp;
|
||||
UPP::Copy(c.image, Point(0, 0), img, img.GetSize());
|
||||
SetHotSpots(c.image, img.GetHotSpot(), img.Get2ndSpot());
|
||||
Reset();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue