I think the most elegant way would be a hybrid way, where the user can set a minimum and maximum size and within those bounds the panel tries to automatically adjust its size to the sizehint of plugins. However, this approach would also take the biggest amount of code, both in the panel itself and in the plugins. Plugins would have to propagate their sizehint to the panel but at the same time would have to be aware of the actual panel size and potentially scale themselves accordingly.

A fixed panel size has the downside that some plugins may have to scale down by such a ridiculous amount that they become unreadable, while an unlimited auto-adjusting panel could theoretically end up occupying the entire screen. I don't think there is a perfect approach. I think as long as the panel and all plugins are well-written my hybrid approach would result in the best appearance, but it's also the most resource-intensive approach making it not fit very well with LXDE's lightweight philosophy. So I can't really tell you what's the best way to go.

Best regards,

On 06-08-13 13:03, Александр Соколов wrote:
Hello everyone!

I want to discuss an algorithm of panel resizing.

How it works now:
Imagine a vertical panel with two plug-ins - clock and a quicklaunch. The clock has format "Do not show date". The panel has following settings: "Line size" - 10 and "Rows count" - 1.
In result the panel is thin.

Now let's change the clock format to "Show date after time"
As you can see the panel is wide. The clock plugin set a minimum width so that would place the text whole.
    * At any size of the line, user sees the all contents of the plugin, not only its part.
    * The behavior of the panel isn't intuitive. We constantly have issues like "Line size "can be set to 10px but the value is not accepted" https://github.com/Razor-qt/razor-qt/issues/564
    * This approach requires a complex code of the panel.
    * Requires additional code from the plugin authors, not much, but the code is not always obvious.
    * There is always a chance that don't neatly written plug-ins "break" the panel.
    * I have some unresolved problem with the taskbar.

Another approach - does not take into account the sizeHint of plugins. The panel always has the size LineSize*RowsCount. And plugins adjusts your size by panel. The plugin can scale content for example decrease font size in date.

Long time I championed the first algorithm, but now I'm inclined to the second. What do you think? Which approach is better? Any opinions are welcome, from the developers, and from the users too.

Best regards,

Get your SQL database under version control now!
Version control is standard for application code, but databases havent 
caught up. So what steps can you take to put your SQL databases under 
version control? Why should you start doing it? Read more to find out.

Lxde-list mailing list