Bug 425949

Summary: Musescore GUI issue on KDE
Product: [Frameworks and Libraries] frameworks-qqc2-desktop-style Reporter: hamelg
Component: generalAssignee: Marco Martin <notmart>
Status: RESOLVED FIXED    
Severity: normal CC: arojas, groot, kde, kde, noahadvs
Priority: NOR    
Version: 5.73.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 5.74
Sentry Crash Report:
Attachments: The panel Palette doesn't display
The Palette panel displays fine
Shell script to demonstrate XDG_CURRENT_DESKTOP effect
stdout/stderr of ok run
stdout/stderr of a bad run

Description hamelg 2020-08-29 15:39:34 UTC
Created attachment 131261 [details]
The panel Palette doesn't display

SUMMARY
Palette panel doesn't display only on KDE environment. On all other desktop environments (fvwm, gnome, xfce, ...) this bug doesn't happen. 

Moreover, the issue happens only when once of these environment variables are set :

XDG_CURRENT_DESKTOP=KDE
KDE_FULL_SESSION=true
DESKTOP_SESSION=/usr/share/xsessions/plasma

as workaround, you start musescore like this :
env -u KDE_FULL_SESSION -u XDG_CURRENT_DESKTOP -u DESKTOP_SESSION musescore

STEPS TO REPRODUCE
1. Start musescore 3.5
2. Got to menu View >> Palette

OBSERVED RESULT
The panel Palette doesn't display

EXPECTED RESULT
The panel Palette displays fine

KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15

ADDITIONAL INFORMATION
Archlinux bug report
https://bugs.archlinux.org/task/67067
Comment 1 hamelg 2020-08-29 15:41:04 UTC
Created attachment 131262 [details]
The Palette panel displays fine
Comment 2 groot 2020-08-30 21:47:56 UTC
Related musescore upstream: https://musescore.org/en/node/307238
Related FreeBSD packaging: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247466

From my (FreeBSD, but otherwise same versions of KDE and Qt and Musescore as in this BR) system I had to unset all three of these variables to get Musescore to display the palette again. But ..

I ran musescore three times with different environments:
 - ( unset KDE_FULL_SESSION ; unset XDG_CURRENT_DESKTOP ; export DESKTOP_SESSION=/usr/local/share/xsessions/plasma ; musescore ) > /tmp/ms-env0.log  2>&1
 - ( unset KDE_FULL_SESSION ; unset XDG_CURRENT_DESKTOP ; export DESKTOP_SESSION=/usr/local/share/xsessions/plasmawubblsdfg ; musescore ) > /tmp/ms-env1.log  2>&1
 - ( unset KDE_FULL_SESSION ; export XDG_CURRENT_DESKTOP=KDE ; export DESKTOP_SESSION=/usr/local/share/xsessions/plasmawubblsdfg ; musescore ) > /tmp/ms-env2.log  2>&1
 - ( unset KDE_FULL_SESSION ; export XDG_CURRENT_DESKTOP=KDE ; unset DESKTOP_SESSION ; musescore ) > /tmp/ms-env2.log  2>&1


In each run of Musescore, I only typed alt-f4 alt-f4 to close it. Only the **second** from this list shows the palette menu. (Note that DESKTOP_SESSION is set to something invalid there; unsetting the variable does the same, but having  XDG point to KDE is also bad for the palette).

I'll attach invocations and log files shortly.
Comment 3 groot 2020-08-30 21:48:46 UTC
Created attachment 131301 [details]
Shell script to demonstrate XDG_CURRENT_DESKTOP effect

Run musescore twice with good and bad environment.
Comment 4 groot 2020-08-30 21:49:18 UTC
Created attachment 131302 [details]
stdout/stderr of ok run

In this run, Musescore shows the palette menu
Comment 5 groot 2020-08-30 21:49:52 UTC
Created attachment 131303 [details]
stdout/stderr of a bad run

In this run, the palette menu is not visible
Comment 6 groot 2020-08-30 21:51:40 UTC
The **primary** difference I see is the cyclic import in Kirigami units (line 1)
Comment 7 Antonio Rojas 2020-08-31 07:19:56 UTC
That same error appears in every Kirigami based application, which otherwise work fine. This one looks more relevant:

qrc:/qml/palettes/PaletteTree.qml:178: Error: Cannot assign to non-existent property "color"
Comment 8 Antonio Rojas 2020-08-31 08:20:00 UTC
(In reply to Antonio Rojas from comment #7)
> That same error appears in every Kirigami based application, which otherwise
> work fine. This one looks more relevant:
> 
> qrc:/qml/palettes/PaletteTree.qml:178: Error: Cannot assign to non-existent
> property "color"

Removing the offending line from PaletteTree.qml doesn't make any difference, so that's also not the problem.
Comment 9 groot 2020-08-31 09:50:40 UTC
Another workaround is `QT_QUICK_CONTROLS_STYLE=Material`, to pick another style for QQC.
Comment 10 David Redondo 2020-08-31 12:36:57 UTC
The cause it org.kde.desktop style ToolSeparator. It fills the entire height and pushes the list out of view.
Comment 11 groot 2020-08-31 12:43:04 UTC
https://invent.kde.org/frameworks/qqc2-desktop-style/-/merge_requests/26 resolves this -- it's a problem with the KDE style -- and should be in KDE Frameworks 5.74 next week (or the week after).
Comment 12 Noah Davis 2020-08-31 12:47:45 UTC
Git commit 1f0f210ad1d8286ba7a8254664489f922cbba0c3 by Noah Davis.
Committed on 31/08/2020 at 12:46.
Pushed by ndavis into branch 'master'.

Don't use parent height/width for implicit ToolSeparator sizing

I realized this was pretty much all wrong, so I rewrote the whole thing with a structure inspired by the Default QQC2 theme.

Padding property was removed since it was originally added to give the
separator back the padding that it lost by having the same height as the
parent.

M  +8    -12   org.kde.desktop/ToolSeparator.qml

https://invent.kde.org/frameworks/qqc2-desktop-style/commit/1f0f210ad1d8286ba7a8254664489f922cbba0c3