Open guiodic opened 3 years ago
enum QStyle::ContentsType
Constant | Value | Description |
---|---|---|
QStyle::CT_Menu | 10 | A menu, like QMenu. |
QStyle::CT_MenuBar | 9 | A menu bar, like QMenuBar. |
QStyle::CT_MenuBarItem | 8 | A menu bar item, like the buttons in a QMenuBar. |
QStyle::CT_MenuItem | 7 | A menu item, like QMenuItem. |
enum QStyle::ControlElement
Constant | Value | Description |
---|---|---|
QStyle::CE_MenuBarItem | 20 | A menu item in a QMenuBar. |
QStyle::CE_MenuBarItem | 20 | A menu item in a QMenuBar. |
QStyle::CE_MenuBarEmptyArea | 21 | The empty area of a QMenuBar. |
QStyle::CE_MenuItem | 14 | A menu item in a QMenu. |
QStyle::CE_MenuScroller | 15 | Scrolling areas in a QMenu when the style supports scrolling. |
QStyle::CE_MenuTearoff | 18 | A menu item representing the tear off section of a QMenu. |
QStyle::CE_MenuEmptyArea | 19 | The area in a menu without menu items. |
QStyle::CE_MenuHMargin | 17 | The horizontal extra space on the left/right of a menu. |
QStyle::CE_MenuVMargin | 16 | The vertical extra space on the top/bottom of a menu. |
// This adds a scroller at the top, but an overflow at the bottom :/
actionMenu->setStyleSheet(QLatin1String("QMenu { menu-scrollable: true; }"));
// We can set the dropdown X11 property after the window opens. I think it's ignored if set before.
// It does nothing visually however.
actionMenu->popup(rootPosition);
actionMenu->setAttribute(Qt::WA_X11NetWmWindowTypeDropDownMenu);
So the issue is probably because the menu bar isn't a real QMenuBar
so it's drawing the menus above the original position.
Edit: What's your screen resolution?
Hmm, is there an environment variable to scale GTK applications so I can easily test in 1080p?
Edit: What's your screen resolution?
1366x768
Hmm, is there an environment variable to scale GTK applications so I can easily test in 1080p?
I don't know, but Libreoffice is a QT app. I have the same problem with Inkscape that is GTK.
Wait nvm, I need to scale KWin not the app itself. I can use the Qt scaling env vars when restarting kwin to test it hopefully... Or just double the UI scaling... Was hoping to not scale my entire OS though.
This can also be reproduced by making kate height smaller than submenu height, than after opening submenu (e.g. File) move mouse to next menu item that is below opened submenu (e.g. Edit) Here is video:
Yes, it's the same problem
(what's your screen recorder?)
(what's your screen recorder?)
OBS Studio
Oh ya, it's easy to just move the window to the bottom of the screen. It looks like the menu will open up the 2nd top level menu if you hover where "Edit" is even though the "File" submenu is covering it.
I am not able to describe the problem clearly, so I prefer to send a video. The issue emerges only for long menues (higher than screen hight)
https://user-images.githubusercontent.com/294764/103149908-8f3c4b00-476e-11eb-8176-bafe0a0f366b.mp4