Closed tsujan closed 5 months ago
@stefonarch Several tests with various themes and font sizes may be needed, but I think the most important tests are about a bottom panel under X11.
After starting the panel, wait 1-2 seconds before showing Fancy Menu (of course, all users do so automatically).
BTW, the #FancyMenu QAbstractScrollArea::corner
trick is still needed for very small screens.
I think there's a problem in positioning of Fancy Menu (which isn't touched by this patch) when the panel is at the bottom. It needs more investigation....
EDIT: I mean under X11.
OK, I found and fixed the problem. The original code relied on a fixed size; corrected now.
This could be changed to 5:4 as in the screenshot below, the appview is now too large.
// Use 3:2 stretch factors so app view is slightly wider than category view
static const int APP_VIEW_STRETCH = 3;
static const int CAT_VIEW_STRETCH = 2;
How do I edit the .menu
file to generate a long category name?
I've changed the <Name>
elements but I think they are overridden by values .directory
files .
Also <Menu>
elements without <Directory>
sub element do not get shown, for example the Screensaver
menu defined in lxqt-applications-compact.menu
OT: I do not get transalted strings, could it be because I'm installing them under /usr/local/share
instead of /usr/share
?
EDIT: applications follow new locale and also FancyMenu categories and applications, except virtual categories which are translated by Panel.
In panel during translations loading for some reason QLocale::system().name()
returns en_US
I think there's a problem in positioning of Fancy Menu (which isn't touched by this patch) when the panel is at the bottom. It needs more investigation....
EDIT: I mean under X11.
I logged into X11, didn't noticed anything, but I see that both in x11 and wayland adding/removing favorites shrinks the menu and scrollbars reappear. Closing and reopening all is fine again though.
How do I edit the
.menu
file to generate a long category name?
You should change italian names in /usr/share/desktop-directories/
(copy them to ~/.local/share/desktop-directories.)
Also
<Menu>
elements without<Directory>
sub element do not get shown, for example theScreensaver
menu defined inlxqt-applications-compact.menu
I've no screensaver installed, should investigate...
OT: I do not get transalted strings, could it be because I'm installing them under
/usr/local/share
instead of/usr/share
?EDIT: applications follow new locale and also FancyMenu categories and applications, except virtual categories which are translated by Panel. In panel during translations loading for some reason
QLocale::system().name()
returnsen_US
About this I've discovered it's caused by the LANGUAGE=en
environment variable which apparently was not changed by lxqt-config-locale
.
Instead LANG
, LC_NUMERIC
, LC_COLLATE
etc are correctly set to it_IT.UTF-8
Qt seems to follow LANGUAGE
so UI items were still in English.
Instead QtXdg
checks LC_MESSAGES
then LC_ALL
(both not set in my env) and as last resort LANG
so it correctly showed Italian names on apps and categories.
adding/removing favorites shrinks the menu and scrollbars reappear. Closing and reopening all is fine again though.
Thanks! I'll fix it here.
I think there's also a scenario that may make the menu too big under rare circumstances (but without scrollbars appearing): namely, a theme change, although its effect will disappear after a panel restart. Its fix should be easy too.
This could be changed to 5:4 as in the screenshot below
I prefer @gfgit's original choice, but yes, tastes differ, and we could add a setting for it later, after this PR is decided.
@gfgit, @stefonarch I might open an issue about it but just wanted to ask here first: have you seen items appearing more than once under a single category? Like this:
I might open an issue about it but just wanted to ask here first: have you seen items appearing more than once under a single category? Like this:
In FancyMenu it did not happen to me but will check again. Instead it happens in the "Open With" sub menu of PacmanFM context menu. Specifically when right clicking on images it shows "Firefox, LXImage, again Firefox". Might be related...
Should I file an issue for language configuration?
Should I file an issue for language configuration?
If there's an issue, why not? Opening issues could help organizing future work, even if the problem is minor.
And welcome to LXQt :)
have you seen items appearing more than once under a single category?
No, never, rechecked. But I noticed now a strange order with the default menu file with openbox above:
I've a menu file which excludes settings and leave, so just categories are left, but the downside is that search doesn't find the removed categories. So I wonder if we could just "hide" "Preferences" and "leave" from it using the default menu which most users do.
This could be changed to 5:4 as in the screenshot below
I prefer @gfgit's original choice, but yes, tastes differ, and we could add a setting for it later, after this PR is decided.
It will show too much unneeded space like this, it was fine before. A setting isn't necessary IMO, we aren't KDE no?
The favorite issue is fixed now. The other rare problem I mentioned earlier is also fixed automatically :) Unless you find another issue, my work is finished here.
It will show too much unneeded space like this.
That depends on what apps you have — and also the language ;)
it was fine before.
I didn't touch that ratio; since the whole window was just narrower when the category view had a horizontal scrollbar, the app view was narrower too.
we aren't KDE no?
In most apps no. In LXQt panel, I think we're reaching KDE's record ;)
we aren't KDE no?
In most apps no. In LXQt panel, I think we're reaching KDE's record ;)
We have maybe the same amount of options but the panel is more configurable ;)
If there's an issue, why not? Opening issues could help organizing future work, even if the problem is minor.
lxqt-config#975 Also I've looked at an old issue. Everything is explained as clearly as possible.
And welcome to LXQt :)
Thanks!
I've a menu file which excludes settings and leave, so just categories are left, but the downside is that search doesn't find the removed categories. So I wonder if we could just "hide" "Preferences" and "leave" from it using the default menu which most users do.
This is interesting.
Also interesting is that Favorites can be chosen only from what is seen in "All Applications" category, but if you manually edit the panel.conf
file you manually could specify a .desktop
file path for Favorites which comes from another non-xdg-standard folder.
In this scenario, the app is correctly shown as Favorite but if you remove it, you cannot re-add it back unless you edit again manually.
I think this is fine though.
Also interesting is that Favorites can be chosen only from what is seen in "All Applications" category,
This isn't like that here, I could always add/remove favorite from everywhere, also search results. Here my menu with the custom menu file
This isn't like that here, I could always add/remove favorite from everywhere, also search results.
Yes I meant Favorites can be added from every application loaded by XdgMenu
which is every app in "All Applications" but also search results and categories which are a subset of "All Applications".
But if you have a .desktop
file in some non-standard directory, it's not loaded by XdgMenu
(unless you manually specify it inside .menu
file).
So you can't search it and cannot add to Favorites unless you manually put the path inside panel.conf
If I understood correctly, IMO it's reasonable to assume menu entries shown are those from included by lxqt-menu-data
files - /usr/share/applications/
and ~/.local/share/applications/
should be totally sufficient.
.desktop
files should be in the applications
dirs. Maybe some user will add a custom file on the desktop, but I don't think it's reasonable to search there.
but I don't think it's reasonable to search there.
Definitely.
I think there is a minor bug when there are scrollbars - there should be a small amount more width to fit the horizontal scrollbar.
System LXQt theme with Fusion:
I don't see any problem in your screenshot. The scrollbars belong to the app view, not the category view, and the active widget style determines everything about them, not the code.
We might want to let user change the window size with a size grip or with a setting
We might want to let user change the window size with a size grip or with a setting
I don't think it would have any practical value. The category view has no scrollbar, and the scrollbars of the app view don't cause any problem.
It depends much of the installed apps and their title and their translations.
I see that in english there are no horizontal scrollbars nowhere, because most application names are shorter. In cmst (Connman UI Setup) the UI is translated and the title get's too long (Configuración de la interfaz de usuario de Connman).
Copying to ~/.local/share/applications
and editing just 2 desktop files ("XFwm4 Window Manager Tweaks" and cmst) I got rid of all horizontal scrollbars.
I noticed that there's an eliding with long names but you have to scroll, maybe this could be done in the visible area?
I noticed that there's an eliding with long names but you have to scroll, maybe this could be done in the visible area?
I found nothing in @gfgit's code that could elide a text;. Maybe Qt does it under special circumstances, or perhaps it's a Qt bug.
All in all, scrollbars aren't evil. They should be shown where needed. Here I made them disappear where they could be avoided as far as possible.
… as far as the available screen geometry allows.