Calculate optimum number of columns for table
nomad at froevel.de
Mon Sep 7 19:54:56 CEST 2015
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?
> > Regards
> > adlo
> > _______________________________________________
> > Xfce4-dev mailing list
> > Xfce4-dev at xfce.org
> > https://mail.xfce.org/mailman/listinfo/xfce4-dev
> Xfce4-dev mailing list
> Xfce4-dev at xfce.org
More information about the Xfce4-dev