Ir para o conteúdo
ou

Software livre Brasil

0 amigos

Nenhum(a)

0 comunidades

Nenhum(a)

 Voltar a Blog
Tela cheia

Smart Put Plugin

4 de Novembro de 2008, 0:00 , por Software Livre Brasil - 0sem comentários ainda | Ninguém está seguindo este artigo ainda.
Visualizado 222 vezes

It’s not so simple to explain what this plugins does, so, since an image is worth a thousand words, maybe a video is worth a thousand images:

Explanation:
It puts the current window in the empty region of the screen with maximum available free space!
It was born from the perception with the combined use of maximumize/minumumize plugins: sometimes everything we just wanted was to put a window in an available empty region of the screen. So… we did it!
As is becoming a standard in this kind of plugin most of the code is inspired/stolen from the maximumize plugin.The algorithm is actually dumb and, maybe, it’s even not correct, but in our tests it worked pretty damn well.

The plugin works like this: a window has four corners. For each window, on each corner we put a box with height 1 pixel and width of 1 pixel. Using routines from the maximumize plugin we expand these boxes and find witch one has maximum area. If the box with maximum area is bigger than the current window box than we just set a new box for the current window. And believe-me: it works!

Finally: It is another useful plugin from us (Eduardo Gurgel and Marco Diego)! You can wait for more useful plugins coming soon!

Code here


Fonte: http://edgurgel.wordpress.com/2008/11/03/smart-put-plugin/

0sem comentários ainda

Enviar um comentário

Os campos são obrigatórios.

Se você é um usuário registrado, pode se identificar e ser reconhecido automaticamente.