Пример #1
0
        void GetCorrectedPathAndPosition(int x, int y, out TreePath path, out IconViewDropPosition pos)
        {
            GetDestItemAtPos(x, y, out path, out pos);

            // Convert drop above/below/into into DropLeft or DropRight based on the x coordinate
            if (path != null && (pos == IconViewDropPosition.DropAbove || pos == IconViewDropPosition.DropBelow || pos == IconViewDropPosition.DropInto))
            {
                if (!path.Equals(GetPathAtPos(x + ItemSize / 2, y)))
                {
                    pos = IconViewDropPosition.DropRight;
                }
                else
                {
                    pos = IconViewDropPosition.DropLeft;
                }
            }
        }
Пример #2
0
        void GetCorrectedPathAndPosition (int x, int y, out TreePath path, out IconViewDropPosition pos)
        {
            GetDestItemAtPos (x, y, out path, out pos);

            // Convert drop above/below/into into DropLeft or DropRight based on the x coordinate
            if (path != null && (pos == IconViewDropPosition.DropAbove || pos == IconViewDropPosition.DropBelow || pos == IconViewDropPosition.DropInto)) {
                if (!path.Equals (GetPathAtPos (x + ItemSize/2, y))) {
                    pos = IconViewDropPosition.DropRight;
                } else {
                    pos = IconViewDropPosition.DropLeft;
                }
            }
        }