mirror of
https://github.com/krustur/IconSnap.git
synced 2026-09-11 19:45:29 +00:00
cleanup - store iconWidth and Heigth in variable
This commit is contained in:
+5
-2
@@ -417,6 +417,9 @@ unsigned int AlignIcon(unsigned char *diskObjectName)
|
||||
// Verbose(" toolType IM1 not found :'(\n", toolType);
|
||||
// }
|
||||
|
||||
short iconWidth = diskObject->do_Gadget.Width;
|
||||
short iconHeigth = diskObject->do_Gadget.Height;
|
||||
|
||||
// diskObject->do_CurrentX += 10;
|
||||
if (diskObject->do_CurrentX == NO_ICON_POSITION && diskObject->do_CurrentX == NO_ICON_POSITION)
|
||||
{
|
||||
@@ -432,7 +435,7 @@ unsigned int AlignIcon(unsigned char *diskObjectName)
|
||||
{
|
||||
if (CenterX)
|
||||
{
|
||||
newx = Align(origx, PaddingLeft, AlignX, diskObject->do_Gadget.Width / 2);
|
||||
newx = Align(origx, PaddingLeft, AlignX, iconWidth / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -453,7 +456,7 @@ unsigned int AlignIcon(unsigned char *diskObjectName)
|
||||
{
|
||||
if (BottomY)
|
||||
{
|
||||
newy = Align(origy, PaddingTop, AlignY, diskObject->do_Gadget.Height);
|
||||
newy = Align(origy, PaddingTop, AlignY, iconHeight);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user