Summary: | When a device connects, it is positioned too far down for a moment, causing it to overlap the separator line | ||
---|---|---|---|
Product: | [Plasma] Bluedevil | Reporter: | Piotr Mierzwinski <piotr.mierzwinski> |
Component: | system tray | Assignee: | Plasma Bugs List <plasma-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | aronkvh, guimarcalsilva, herzenschein, isma.af, natalie_clarius, nate, piotr.mierzwinski, plasma-bugs, postix, rybak.a.v, sitter |
Priority: | HI | ||
Version: | 5.22.0 | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/bluedevil/commit/1956411588dbed54acb672d89ca003d8806684c4 | Version Fixed In: | 5.27.5 |
Sentry Crash Report: | |||
Attachments: |
plasma-bluetooth-separating_line (incorrect)
plasma-bluetooth-separating_line (incorrect,dark) Plasma-font plasma-bluetooth-separating_line (incorrect)-Neon how-to-achieve-incorrect-separator-in_blutooth The glitch in Breeze dark |
Created attachment 139307 [details]
plasma-bluetooth-separating_line (incorrect,dark)
In case of bright plasma I used Plasma Style calling: Breeze In case of dark plasma I used Plasma Style calling: ROUNDED COLOR Works for me. What font and font size are you using? Are you overriding the font DPI in any way? (In reply to Nate Graham from comment #3) > Works for me. What font and font size are you using? Are you overriding the > font DPI in any way? Fixed width: Hack 10pt All other: Noto Sans 10pt DPI is not overridden. Other details in attached screen. As I mentioned for me also works, but only when I wait till connection will be established, otherwise always this line is drawn in incorrect place (as in attachment). Created attachment 139346 [details]
Plasma-font
Hmm that's strange, then. (In reply to Nate Graham from comment #6) I'm not sure, but I think you are doing something wrong and that's why you cannot replicate it. I just did it on KDE Neon (Unstable edition) using newly created user account. So having couple BT devices please click "Connect" on first and immediately click into desktop. After connection will be established please open Bluetooth panel. I will attach another screen shot coming from Neon. Plasma 5.22.80; Style: ROUNDED COLOR; Color: Dark Breeze; Font: Noto Sans 10pt with forced DPI (120) KF 5.83 Qt 5.15.3 X11 Let me know if you need more details. Could you attach a screen recording so I can be sure I'm testing in the same way? Created attachment 139394 [details]
plasma-bluetooth-separating_line (incorrect)-Neon
Created attachment 139396 [details]
how-to-achieve-incorrect-separator-in_blutooth
Thanks, can reproduce now. It's actually not that the line is positioned incorrectly, but rather that the connected item is positioned incorrectly. For me, I can see that it overlaps the line when it connects, but then in a moment, it jumps up to its correct location. I'll see what I can do about it. The bug is somewhere here: https://invent.kde.org/plasma/bluedevil/-/blob/master/src/applet/package/contents/ui/FullRepresentation.qml#L76 I suspect that the conditions get evaluated at different times, which causes the UI to not update both elements simultaneously, as expected. Prooooooobably this line in particular: height: active ? PlasmaCore.Units.gridUnit : 0 Yeah it's that line, but without it, the loader for the section delegate that we're trying to hide is invisibly there with too much height. Can't figure it out right now, giving up. Hopefully someone smarter than me can figure it out. (In reply to Nate Graham from comment #13) > Yeah it's that line, but without it, the loader for the section delegate > that we're trying to hide is invisibly there with too much height. > > Can't figure it out right now, giving up. Hopefully someone smarter than me > can figure it out. Thank you for your effort. I think this was redesigned comparing to 5.21, so maybe author this change will be know something more. It was, and I was the author. :/ Created attachment 143976 [details]
The glitch in Breeze dark
*** Bug 447189 has been marked as a duplicate of this bug. *** *** Bug 448158 has been marked as a duplicate of this bug. *** Ah, the problem is that Logic.conectedDevicesCount() is imperative, and not a property. So when that changes, the UI code doesn't get notified and updated itself as it should. (In reply to Nate Graham from comment #19) > Ah, the problem is that Logic.conectedDevicesCount() is imperative, and not > a property. So when that changes, the UI code doesn't get notified and > updated itself as it should. I've been playing with this for a bit, and I'm mostly convinced that this is an upstream issue on how sections are created, possible due to optimizations. It seems that when creating the new "Connected" section, a copy of the other one is first made, and then the properties get updated, which results in the visual glitch. This is what happens when connecting a new device. // This is the "Available" section loader qml: ** Loader.onActiveChanged() ID: QQuickLoader(0x55c6450a4800) section: Available connectedDevices: 1 active: true // This is the "Connected" section loader. But it starts as "Available" qml: ** Loader.onActiveChanged() ID: QQuickLoader(0x55c6450a3480) section: Available connectedDevices: 1 active: true qml: ** Loader.onActiveChanged() ID: QQuickLoader(0x55c6450a3480) section: Connected connectedDevices: 1 active: false All the things I've tried didn't make the glitch go away: - Refactoring the applet to use properties instead of imperative code doesn't fix the issue. - Playing with the height and active properties to change the order of evaluation - Using the Connected property instead of the proxy Section, so we're sure the sorting and the sections are in sync. A possibly relevant merge request was started @ https://invent.kde.org/plasma/bluedevil/-/merge_requests/123 Git commit 6201245c45b96fd6f06cca9e532cd7a184f4c743 by Harald Sitter. Committed on 25/04/2023 at 11:27. Pushed by ngraham into branch 'master'. applet: introduce a brief animation for section height estimates section delegates changing height is a bit buggy. as a simple bandaid try to delay the height change a bit via a behavior. NOTE: this doesn't actually animate, it's purely there for the delay aspect huge hack but it gives the view a better chance of figuring out a layout that works from my testing QTBUG-29148 M +4 -0 src/applet/package/contents/ui/FullRepresentation.qml https://invent.kde.org/plasma/bluedevil/commit/6201245c45b96fd6f06cca9e532cd7a184f4c743 Git commit 1956411588dbed54acb672d89ca003d8806684c4 by Nate Graham, on behalf of Harald Sitter. Committed on 25/04/2023 at 15:07. Pushed by ngraham into branch 'Plasma/5.27'. applet: introduce a brief animation for section height estimates section delegates changing height is a bit buggy. as a simple bandaid try to delay the height change a bit via a behavior. NOTE: this doesn't actually animate, it's purely there for the delay aspect huge hack but it gives the view a better chance of figuring out a layout that works from my testing QTBUG-29148 (cherry picked from commit 6201245c45b96fd6f06cca9e532cd7a184f4c743) M +4 -0 src/applet/package/contents/ui/FullRepresentation.qml https://invent.kde.org/plasma/bluedevil/commit/1956411588dbed54acb672d89ca003d8806684c4 |
Created attachment 139306 [details] plasma-bluetooth-separating_line (incorrect) SUMMARY I have paired couple BT devices. After connecting device to bluetooth, line which separates them in Bluetooth panel partially crosses out connected device when I close it (panel) before connection has been established. If I will wait till connection will be established this line is correctly displayed. Details please find in attached screenshot. STEPS TO REPRODUCE 1. Click connect in Bluetooth panel/applet 2. Don't wait till connection will be established only click into desktop, closing Bluetooth panel 3. If connection becomes established open Bluetooth panel 4. Look at separating line OBSERVED RESULT line partially crosses out connected device EXPECTED RESULT line should not cross out connected device SOFTWARE/OS VERSIONS Linux/KDE Plasma: YES (available in About System) KDE Plasma Version: 5.22 KDE Frameworks Version: 5.82 Qt Version: 5.15.2 (+kde patches) ADDITIONAL INFORMATION