Calculate optimum number of columns for table
adloconwy at gmail.com
Tue Sep 8 02:30:13 CEST 2015
At the moment, xfdashboard seems to increase the number of columns as the number of windows increases. What algorithm is it using to do this?
> On 7 Sep 2015, at 18:54, Stephan Haller <nomad at froevel.de> wrote:
> BTW: This is the algorith I decided to give a first try when I'm going
> to C easily.
> I hope it helps.
> Am Montag, den 07.09.2015, 19:42 +0200 schrieb Stephan Haller:
>> Hi adlo,
>> I have this problem either in xfdashboard. I learned that this is a
>> "packing problem", sometimes also called "bin packing problem" or "box
>> packing problem".
>> I haven't implemented any of these algorithm yet, so I cannot say if it
>> really helps and how hard it is to implement. But I think you could
>> start your search there.
>> Am Montag, den 07.09.2015, 16:15 +0100 schrieb adlo:
>>> I am writing a program that displays previews of all open windows in a grid/table. Depending on factors such as the dimensions of the grid and the number of previews displayed, it would be useful to dynamically change the number of columns/rows in the grid, in order to ensure that the previews are as large as possible while making the best use of the available space.
>>> For example, when there are only a few previews, the number of columns and rows can be reduced in order to ensure that the previews are as large as possible. However, if there are a lot of previews and there is some extra horizontal space, the number of columns should be increased.
>>> It would be useful to have an algorithm that could calculate the optimum number of columns. Does anyone have any ideas?
>>> Xfce4-dev mailing list
>>> Xfce4-dev at xfce.org
>> Xfce4-dev mailing list
>> Xfce4-dev at xfce.org
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
More information about the Xfce4-dev