elementary / applications-menu

Applications Menu for elementary OS and the Pantheon desktop environment
https://elementary.io
GNU General Public License v3.0
104 stars 36 forks source link

Context menus are not shown with proper height #423

Closed ryonakano closed 3 years ago

ryonakano commented 4 years ago

Prerequisites

Describe the bug

Screen record from 2020-10-07 11 47 15

The "Uninstall" and "Show in AppCenter" menu entry in the context menu of an app icon is not shown by default and need to scroll on the menu.

To Reproduce

Steps to reproduce the behavior:

  1. Open Applications Menu
  2. Click on some app e.g. Files, AppCenter, Calcurator, or curated apps like Reco, LookBook, etc.
  3. See "Uninstall" and "Show in AppCenter" is not shown by default
  4. Scroll on the context menu. "Uninstall" and "Show in AppCenter" appears

Expected behavior

All context menu entries should be shown by default without scrolling.

Platform Information

cassidyjames commented 4 years ago

Whoa, that's wild. This must be a pretty recent change, and I can confirm it here.

ryonakano commented 4 years ago

Hmm, I also face this issue in context menus in some other apps, e.g. Files:

2020-10-12 10 32 37 の画面録画

Might be a GTK or stylesheet issue?

jeremypw commented 4 years ago

I do not think this part of the code has changed so looks like a side-effect of some upstream change. I'll see if there is a fix.

jeremypw commented 4 years ago

I havent found a fix by tweaking the Gtk.Menu used. Its size seems to be limited by the height of the headerbar (even if attached to and shown on a larger widget). There is no significant difference between the code used for this menu and the View context menu. Maybe a window manager issue? Or possibly associated with the change to using Hdy widgets. May have to use a popover instead. As Files master is now incompatible with Hera the fix will not appear until Odin is released.

jeremypw commented 4 years ago

Part of the problem is that the menu does not know what size it needs to be when it is shown since it is shown before the directory has finished loading its children (in case this takes a long time). It is is possible to set the initial size larger, but it does not resize when loading is finished and the extra items added (even if size request changed manually).

cassidyjames commented 4 years ago

I'm no longer able to reproduce this; I wonder if something changed in Ubuntu's GTK again?

meisenzahl commented 3 years ago

@ryonakano are you still able to reproduce this?

ryonakano commented 3 years ago

@meisenzahl Yeah, unfortunately on my side. I'm using the latest updated odin and it still occurs:

screenshot

cassidyjames commented 3 years ago

I am also still getting this/getting this again on an up-to-date 6.0 install, in English. It might be some sort of race condition when the menu is initialized, because I don't think I see it every time…

hanaral commented 3 years ago

I still get this everywhere ryonakano reported it, the application menu context menus are now not usable due to the scrollable arrows being oversized: 2021-01-24 10 07 19 のスクリーンショット