Icondesk wrapcount problem. Thread last updated on 2004-07-14 01:08:17

Posted by member 31609 on 2004-07-13 16:10:32

Maybe some guru out there can help with this... Using the icondesk module, I want make the desktop icons go half-way horizontally across the screen and then wrap to a new line.
I was using this to do that before:
IconDeskMainIconsWrapCount $ResolutionX/2/20
(20 is the area used by the icon)

But it wasn't producing the right number of icons. This is what I came up with to fix that, but I'm hoping there's a better way to do this.
; This determines how many icons will be displayed on
; the desktop before starting a new row of icons.

If ResolutionX = 640
IconDeskMainIconsWrapCount 12
ElseIf ResolutionX = 800
IconDeskMainIconsWrapCount 18
ElseIf ResolutionX = 1024
IconDeskMainIconsWrapCount 27 ;No problems above this res ^_^
Else
;Fixes the icon count for all the other resolutions
IconDeskMainIconsWrapCount $ResolutionX/2/18$
EndIf

The main problem is there's a status bar on the opposite side of the screen that will over lap if there are to many icons. If you can suggest better solution (even using a different module) I be happy to hear it, thanks.

Posted by member 103440 on 2004-07-13 17:06:32 link

- Use this example code (take from Austerity):

DTopIconHeight $IconDeskDTopSize+IconDeskDTopSpacingY+IconDeskDTopTextSpacing+IconDeskDTopTextHeight$
IconDeskDTopWrapCount $DTopHeightAvailable/DTopIconHeight$

- You can try xDesktop.

Posted by member 31609 on 2004-07-14 01:08:17 link

I think I see how that works...

DTopHeightAvailable = Available desktop space
DTopIconHeight = Space consumed by the icons

then we take those numbers and input them...

IconDeskDTopWrapCount = DTopHeightAvailable/DTopIconHeight

To find how many icons can fit in the given area. Cool that worked like a charm, thanks for the help.