Bali10050 / Lightly

A modern style for qt applications.
Other
111 stars 7 forks source link

problem with system settings and colours #29

Closed mashrit closed 1 week ago

mashrit commented 1 month ago

i installed this theme and wanted the glassy blurred look

so, i installed the glassly colour scheme and when i opened the system settings,this happened

image

btw love that someone is finally maintaining(and improving) this theme

Bali10050 commented 1 month ago

It seems like all lightly forks have this issue, so there's no quick fix that I can provide. It seems like it only happens on wayland, so if you want to use it on x11, you can. The best piece of info I could find is that it happens when [Colors:Window] has a BackgroundNormal with transparency bellow 100. If you have trouble changing your settings back, you can use uninstall.sh, but you need to set it executable, and use sudo to run it, then kde should use the default breeze theme as a fallback, which doesn't have this problem. Sorry for the inconvenience.

DeltaCopy commented 1 month ago

What is strange is that after I use kcmshell6 kcm_landingpage from the terminal then systemsettings opens as expected. Both sidebar and content window to the right are visible.

mashrit commented 1 month ago

The best piece of info I could find is that it happens when [Colors:Window] has a BackgroundNormal with transparency bellow 100.

according to my own research it seems that any transparency value below 255 triggers this

DeltaCopy commented 1 month ago

I don't have a proper solution to this. However, here are my findings.

Tested on Archlinux | Plasma 6.2.1

Firstly, the issue seems to be around the blurring of windows. Specifically the lines:

https://github.com/Bali10050/Lightly/blob/qt6/kstyle/lightlyblurhelper.cpp#L176 https://github.com/Bali10050/Lightly/blob/qt6/kstyle/lightlyblurhelper.cpp#L177

The alpha channel of this color scheme has a value of 220 - BackgroundNormal=30,32,36,220 inside [Colors:Window] Commenting out those 2 lines opens systemsettings using the Glassly-Darker color scheme.

@mashrit please send info on distro and Plasma version.

Edit.

Tested on Kubuntu | Plasma 6.1.5 - No issues with systemsettings Tested on Fedora 40 | Plasma 6.1.5 - No issues with systemsettings

This may be a problem with Plasma 6.2.1 and whatever changes that have been made. It would be good to check if others are experiencing the same on an older version of Plasma.

mashrit commented 1 month ago

I am using EndeavourOs plasma version: 6.2.1 qt version 6.8.0

DeltaCopy commented 1 month ago

Does switching the backend render mode to software help ?

kcmshell6 kcm_qtquicksettings Render Backend: Software

mashrit commented 1 month ago

Does switching the backend render mode to software help ?

kcmshell6 kcm_qtquicksettings Render Backend: Software

yes, this works

mashrit commented 1 month ago

ok

now there is this issue, so images are being drawn at the corner

DeltaCopy commented 1 month ago

now there is this issue, so images are being drawn at the corner

Not too sure maybe try resizing the window to repaint the window.

Be advised that if you use software rendering it will ultimately use your CPU for rendering rather than the GPU. It is not a permanent solution as it degrades performance.

The following has been tested. Using the Glassly-Darker color scheme.

With no changes to the backend renderer.

EndeavourOS Plasma 6.1.5 QT 6.7.2 Works

EndeavourOS Plasma 6.2.1 QT 6.8.0 Doesn't work

Fedora 40 Plasma 6.2.1 QT 6.7.2 Works

@Bali10050 this issue is due to whatever changes that have been made in QT 6.8.0 https://doc.qt.io/qt-6/whatsnew68.html#qt-quick-controls-module

christiantosta commented 1 month ago

Problem not occurs with Vinyl which is a Lightly fork.

Fedora: 40 Plasma: 6.2.1 Frameworks: 6.7.0 Qt: 6.7.2

vinyl_6 1 6-glassy

Update: I can't open system settings from Konsole or from Task Manager applet and I'm got the error below:

[tosta@metallica ~]$ systemsettings qt.qpa.wayland: eglSwapBuffers failed with 0x300d, surface: 0x0

The problem occurs with Lightly and Vinyl, but not with Breeze.

https://bbs.archlinux.org/viewtopic.php?id=298204 https://forum.qt.io/topic/158667/invisible-window-created-with-eglswapbuffers-error-0x300d

Update 2: Putting the follow inside ~/.bash_alias or ~/.bashrc workarounded the problem:

alias systemsettings="QT_QPA_PLATFORM=xcb /usr/bin/systemsettings"

Update 3: Fixed upgrading qt6-qtwayland for F40: https://copr.fedorainfracloud.org/coprs/ekaaty/kde-extras/build/8169246/ https://download.copr.fedorainfracloud.org/results/ekaaty/kde-extras/fedora-40-x86_64/08169246-qt6-qtwayland/qt6-qtwayland-6.7.2-5.fc40.x86_64.rpm

Please check if this update solves the color issue for Fedora 40 and Glassy color-scheme.

Bali10050 commented 1 month ago

I'm not sure if I'm hallucinating or not, but 532779d seems to fix this issue

mashrit commented 1 month ago

I'm not sure if I'm hallucinating or not, but 532779d seems to fix this issue

we both might be hallucinating then

christiantosta commented 1 month ago

I'm not sure if I'm hallucinating or not, but 532779d seems to fix this issue

Looks like a reversion of a previous patch. But lines 142/143 are redundant, no? On Vinyl, codes looks as below:

                // cast to widget and check
                QWidget* widget(qobject_cast<QWidget*>(object));

                if (!widget)
                    break;

                update(widget);
                break;
            }

...

                // blur entire window
                if( widget->palette().color( QPalette::Window ).alpha() < 255 )
                    return roundedRegion(rect, StyleConfigData::cornerRadius(), false, false, true, true);

                // blur specific widgets
                QRegion region;

But I prefer to use kwin effects to blur them via Lightly/Vinyl.

DeltaCopy commented 1 month ago

But lines 142/143 are redundant, no?

Yes now redundant code.