lxqt / lxqt-panel

The LXQt desktop panel
https://lxqt-project.org
GNU Lesser General Public License v2.1
193 stars 135 forks source link

Issues 2124 #2125

Closed kurokawachan closed 2 months ago

kurokawachan commented 2 months ago

Allow setting the direction of StatusNotifierWidget [Feature request] Add direction in the way the status notifier icon is inserted https://github.com/lxqt/lxqt-panel/issues/2124

stefonarch commented 2 months ago

It works fine - if the panel is horizontal. My tray area is on a right vertical panel and I don't see any change of order (which happens already when checking/unchecking the option) and new items appear always at bottom.

The text could then be "Add icons at the beginning" or similar, not easy.

tsujan commented 2 months ago

My tray area is on a right vertical panel and I don't see any change of order

Yes. The reason is that the layout isn't an ordinary QLayout but an LXQt::GridLayout, which is derived from QLayout to handle both horizontal and vertical arrangements.

Actually, the main problem of the code isn't about the dependency of the direction on the language but about ignoring

    enum Direction
    {
        LeftToRight,    ///< The items are first laid out horizontally and then vertically.
        TopToBottom     ///< The items are first laid out vertically and then horizontally.
    };

in https://github.com/lxqt/liblxqt/blob/1a4055a20cad2f38e7725dfde68848542b355ecd/lxqtgridlayout.h#L52-L56

To do consistently what is intended here, we need to make changes to liblxqt, and I don't think the former could justify the latter (→ https://github.com/lxqt/lxqt-panel/issues/2124#issuecomment-2379549955).

kurokawachan commented 2 months ago

Thanks for the review, would you please take a look if this fix the issue https://github.com/lxqt/liblxqt/pull/352

tsujan commented 2 months ago

Superseded by https://github.com/lxqt/lxqt-panel/pull/2128

kurokawachan commented 1 month ago

Hello @tsujan

I can see you have already implemented this feature. Thank you very much