linuxmint / cinnamon

A Linux desktop featuring a traditional layout, built from modern technology and introducing brand new innovative features.
GNU General Public License v2.0
4.53k stars 735 forks source link

Menu applet graphical vertical tearing on scroll #11760

Open Monn-i opened 1 year ago

Monn-i commented 1 year ago

Distribution

Mint 21.2

Package version

Cinnamon 5.8.4

Graphics hardware in use

Intel Haswell-ULT Integrated Graphics

Frequency

Always

Bug description

Occurred right after Mint 21.2 upgrade.

Disabled 3rd-party applets, rebooted cinnamon, rebooted system, still occurs.

https://github.com/linuxmint/cinnamon/assets/32353070/061cef61-3657-4e51-ab13-4cdc41364a7b

Steps to reproduce

Open Menu applet, scroll menu groups

Expected behavior

Menu graphics not tearing when scrolling, left side column scrollbar not visible

Additional information

System: Lenovo Thinkpad X240 Display size: 1920x1080 Scaling: 1.0x

Theming (changing doesn't affect behavior, but just in case):

Applications: Mint-Y-Dark Icons: Mint-Y-Yaru Desktop: Mint-Y-Dark

fredcw commented 1 year ago

This was present in Mint 21.1 as well. It's also the same in CinnVIIStarkMenu applet. It doesn't happen in Cinnamenu though maybe because Cinnamenu doesn't use a scroll bar for the categories.

zyoc commented 1 year ago

I cannot duplicate that issue in 21.2.

Mouse Pointer: Cinnamon-Mint Large Applications: Mint-X-Blue Icons: Mint-X-Orange Desktop: Graphite-Zero

Desktop: AMD Ryzen 9 5900X Display: 2560 x 1440 Radeon RX 580

https://github.com/linuxmint/cinnamon/assets/77733610/2b476359-a2a0-469c-8d05-9e4e1dad3420

fredcw commented 1 year ago

It doesn't happen in all cinnamon themes, it seems related to the size of l/r padding in style class .menu-categories-box. if l/r padding is less than 10px or if you replace l/r padding with l/r margin, it disappears. I've noticed that increasing the padding of .menu-applications-box causes it to happen in the apps list as well.

Edit: So it seems it's related to the size of the padding of the container inside St.ScrollView but only when the scrollbar is present.

fredcw commented 1 year ago

If I increase the left padding of St.Scrollview's child actor (categoriesBox) to 100px and scroll by dragging the scrollbar, I get this:

scroll-2023-07-19_19.25.40.webm

It seems to ignoring the child actor's padding when calculating the width to be scrolled, or something like that?

Edit: There's no problem when scrolling is caused by autoscroll though.

JTEpic commented 1 year ago

This tearing is happening to me on my laptop, fresh install of mint, I am using:

Mouse Pointer: Adwaita Applications: Mint-Y-Dark Icons: Mint-Y Desktop: Mint-Y-Dark

Kernel: 5.15.0-84-generic Cinnamon 5.8.4 Linux Mint 21.2 Intel Core i7-10610U 1920x1080 Integrated Graphics Mesa Intel UHD Graphics

Monn-i commented 9 months ago

This still occurs with latest Cinnamon, changes since I first opened the issue:

Distribution

Linux Mint 21.3

Package version

Cinnamon 6.0.4

Distribution

Mint 21.2

Package version

Cinnamon 5.8.4

Graphics hardware in use

Intel Haswell-ULT Integrated Graphics

Frequency

Always

Bug description

* Menu applet graphically tears vertically and stays long periods in teared state after scrolling

* Left side column has scroll even though it doesn't need it, also reacts to scrolling the menu's group listing

Occurred right after Mint 21.2 upgrade.

Disabled 3rd-party applets, rebooted cinnamon, rebooted system, still occurs. 2023-07-18.09-07-12.mp4

Steps to reproduce

Open Menu applet, scroll menu groups

Expected behavior

Menu graphics not tearing when scrolling, left side column scrollbar not visible

Additional information

System: Lenovo Thinkpad X240 Display size: 1920x1080 Scaling: 1.0x

Theming (changing doesn't affect behavior, but just in case):

Applications: Mint-Y-Dark Icons: Mint-Y-Yaru Desktop: Mint-Y-Dark

blutuna commented 9 months ago

> This still occurs with latest Cinnamon, changes since I first opened the issue:

This issue is no longer present on my machine with t̶h̶e̶ ̶u̶p̶d̶a̶t̶e̶ new install of 21.3...

Kernel: 6.2.0-39-generic x86_64 bits: Desktop: Cinnamon 6.0.4 tk: GTK 3.24.33 Desktop Mobo: ASUSTeK model: TUF GAMING X570-PLUS (WI-FI) 16-core model: AMD Ryzen 9 5950X bits: NVIDIA vendor: ASUSTeK driver: nvidia v: 535.154.05

fredcw commented 9 months ago

@claudiux This bug still exists and hasn't been fixed in 21.3. It's more noticeable in some themes rather than others, check my video above.

claudiux commented 9 months ago

I've read: "This issue is no longer present on my machine with t̶h̶e̶ ̶u̶p̶d̶a̶t̶e̶ new install of 21.3..." in https://github.com/linuxmint/cinnamon/issues/11760#issuecomment-1906527191

blutuna commented 9 months ago

I misspoke in my previous reply. In Ciinnamenu it doesn't appear but in Main Cinnamon Menu I do still see it.

claudiux commented 9 months ago

@fredcw In /usr/share/cinnamon/applets/menu@cinnamon.org/applet.js, replacing the line 2727: this.categoriesBox = new St.BoxLayout({ style_class: 'menu-categories-box', by: this.categoriesBox = new St.BoxLayout({ style_class: 'menu-applications-inner-box', seems to solve the problem.

blutuna commented 9 months ago

I can confirm that replacing 'menu-categories-box' with 'menu-applications-inner-box' solves the issue on my machine.

pxcandeias commented 3 months ago

This fix also works for issue https://github.com/linuxmint/cinnamon/issues/11761. Had to manually edit the file /usr/share/cinnamon/applets/menu@cinnamon.org/applet.js as this fix has not yet been merged in Linux Mint 21.3 Cinnamon 6.0.4.

alexkuz commented 3 months ago

Does anyone know why this class fixes the issue though and what was the actual problem with menu-categories-box?

It's nice to have a workaround but it looks more like sweeping the problem under the rug.

fredcw commented 3 months ago

@alexkuz https://github.com/linuxmint/cinnamon/pull/12049#issuecomment-1910156927