Bug 480892 - Night light location symbol on the map in "Sunset and Sunrise at manual location" is below the cursor
Summary: Night light location symbol on the map in "Sunset and Sunrise at manual locat...
Status: RESOLVED FIXED
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_nightcolor (show other bugs)
Version: 5.93.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-02-05 12:30 UTC by athaswildwhisper55232.untainted604
Modified: 2024-02-08 18:34 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description athaswildwhisper55232.untainted604 2024-02-05 12:30:06 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

STEPS TO REPRODUCE
1. Open night light settings
2. Select "Switching times" to "Sunset and Sunrise at manual location"
3. Click a location anywhere on the map.

OBSERVED RESULT
View the webm video: https://files.catbox.moe/jizzwg.webm

EXPECTED RESULT
The location symbol in the map should correspond to the exact location specified by the mouse pointer.

Operating System: EndeavourOS 
KDE Plasma Version: 5.93.0
KDE Frameworks Version: 5.249.0
Qt Version: 6.7.0
Kernel Version: 6.7.3-arch1-2 (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Celeron® N4100 CPU @ 1.10GHz
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 600
System Version: 1.0

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2024-02-05 21:10:58 UTC
Can reproduce.
Comment 2 Ismael Asensio 2024-02-05 21:48:30 UTC
I cannot reproduce this on latest master but Qt6.6. 

Might be an upstream regression/change on `mapFromItem()` or `sceneEvent()`?
Comment 3 athaswildwhisper55232.untainted604 2024-02-06 05:06:55 UTC
Additional info:

As I click any point in the map at Night Color/Sunset and Sunrise at manual location, this pops up in systemsettings log:

qt.qml.context: qrc:/kcm/kcm_nightcolor/LocationsFixedView.qml:173:25 Parameter "eventPoint" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
Comment 4 Nate Graham 2024-02-06 15:14:27 UTC
FWIW I'm able to reproduce it with master on Qt 6.6.0. I use 225% scaling and 36px Breeze cursors, but I changed these to 200% and 24px (respectively) and there was no change. Same at 100% scale too.
Comment 5 athaswildwhisper55232.untainted604 2024-02-06 17:19:34 UTC
(In reply to Nate Graham from comment #4)
> FWIW I'm able to reproduce it with master on Qt 6.6.0. I use 225% scaling
> and 36px Breeze cursors, but I changed these to 200% and 24px (respectively)
> and there was no change. Same at 100% scale too.

I ran "systemsettings kcm_nightcolor" on Konsole terminal

As I click on any location on the map in "Night color / sunset and sunrise at manual location", I see this message on my terminal:

qt.qml.context: qrc:/kcm/kcm_nightcolor/LocationsFixedView.qml:173:25 Parameter "eventPoint" is not declared. Injection of parameters into signal handlers is deprecated. Use JavaScript functions with formal parameters instead.
Comment 6 Bug Janitor Service 2024-02-06 19:46:19 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/3874
Comment 7 Ismael Asensio 2024-02-08 16:43:59 UTC
Git commit f8114bd5ae06c50e4b4821b5cbc752f032322392 by Ismael Asensio.
Committed on 08/02/2024 at 16:29.
Pushed by iasensio into branch 'master'.

kcms/nightcolor: Fix click position for manual location

To get the click point in local coordinates of the image, including
its scaling transform, we can use the `position` property of the event
point directly.

See https://doc.qt.io/qt-6/qml-qtquick-handlerpoint.html#position-prop
FIXED-IN: 6.0

M  +2    -2    kcms/nightcolor/ui/LocationsFixedView.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/f8114bd5ae06c50e4b4821b5cbc752f032322392
Comment 8 Ismael Asensio 2024-02-08 18:34:52 UTC
Git commit de8b79917c6c1dbd56f14bb547c1876ef871061c by Ismael Asensio.
Committed on 08/02/2024 at 18:33.
Pushed by iasensio into branch 'Plasma/6.0'.

kcms/nightcolor: Fix click position for manual location

To get the click point in local coordinates of the image, including
its scaling transform, we can use the `position` property of the event
point directly.

See https://doc.qt.io/qt-6/qml-qtquick-handlerpoint.html#position-prop
FIXED-IN: 6.0
(cherry picked from commit f8114bd5ae06c50e4b4821b5cbc752f032322392)

M  +2    -2    kcms/nightcolor/ui/LocationsFixedView.qml

https://invent.kde.org/plasma/plasma-workspace/-/commit/de8b79917c6c1dbd56f14bb547c1876ef871061c