Bug 440283 - Changing the value of iconOffsetY inside a custom indicator (with a Binding) doesn't appear to move the icons up nor down
Summary: Changing the value of iconOffsetY inside a custom indicator (with a Binding) ...
Status: RESOLVED FIXED
Alias: None
Product: lattedock
Classification: Unmaintained
Component: application (other bugs)
Version First Reported In: git (master)
Platform: Compiled Sources Linux
: NOR minor
Target Milestone: ---
Assignee: Michail Vourlakos
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-26 01:45 UTC by Cyrus
Modified: 2021-07-26 19:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Cyrus 2021-07-26 01:45:13 UTC
SUMMARY
Changing the value of iconOffsetY inside a custom indicator (with a Binding) doesn't appear to move the icons up nor down

STEPS TO REPRODUCE
1. Add a Binding targeting level.requested's iconOffsetY property
2. Change the value to any integer
3. Install/Update the indicator package

OBSERVED RESULT
The application icons have not moved.

EXPECTED RESULT
The application icons should have shifted up or down, depending on the value.

SOFTWARE/OS VERSIONS
OS: Arch Linux
KDE Plasma Version: 5.22.3
KDE Frameworks Version: 5.84.0
Qt Version: 5.15.2
Latte: Latest Git version

ADDITIONAL INFORMATION
I'm basing my indicator on https://github.com/psifidotos/latte-indicator-win10.
The Win10 indicator has a Binding targeting level.requested's iconOffsetX property, of which
I can modify the value and see the icons shifted left or right.
But when trying to use a similar Binding for the iconOffsetY property, the icons don't move up
nor down, no matter the value.

// This moves the icons a little bit to the right
Binding{
        target: level.requested
        property: "iconOffsetX"
        when: level && level.requested && level.requested.hasOwnProperty("iconOffsetX")
        value: 10 // Arbitrary value
    }

// This does not move the icons
Binding{
        target: level.requested
        property: "iconOffsetY"
        when: level && level.requested && level.requested.hasOwnProperty("iconOffsetY")
        value: 10 // Arbitrary value
    }

I'm very new to Qt and QML, forgive me if it isn't a bug and instead a misunderstanding on my part.

UNRELATED QUESTION
Is there a way for an indicator to change the size/scale of an icon?
I would like to add a shrinking effect on click to my indicator, but from what I've
gathered from the techbase page it doesn't seem possible.
Comment 1 Michail Vourlakos 2021-07-26 06:55:39 UTC
Git commit 1cf1aeb730aba78f236b0ebd574c194f108126f6 by Michail Vourlakos.
Committed on 26/07/2021 at 06:52.
Pushed by mvourlakos into branch 'v0.10'.

respect indicators iconOffsetX/Y values properly

M  +3    -3    declarativeimports/abilities/items/basicitem/ParabolicItem.qml

https://invent.kde.org/plasma/latte-dock/commit/1cf1aeb730aba78f236b0ebd574c194f108126f6
Comment 2 Michail Vourlakos 2021-07-26 06:55:52 UTC
Git commit 47702a59bea5af8aa1aa57e837788e58c27194c8 by Michail Vourlakos.
Committed on 26/07/2021 at 06:55.
Pushed by mvourlakos into branch 'master'.

respect indicators iconOffsetX/Y values properly

M  +3    -3    declarativeimports/abilities/items/basicitem/ParabolicItem.qml

https://invent.kde.org/plasma/latte-dock/commit/47702a59bea5af8aa1aa57e837788e58c27194c8
Comment 3 Michail Vourlakos 2021-07-26 06:59:46 UTC
Nice catch! The iconOffsetY issue was a Latte bug.

UNRELATED QUESTION
Unfortunately there is not a way for an indicator to change the size/scale of an icon. Such request falls into the category to have icons animations when the user clicks or on other events. Unfortunately this is not supported yet. It could be in the future but no idea if it will be added eventually.

You are the first person trying to implement a new indicator except me :) so there is not much of developer interest yet for them.
Comment 4 Cyrus 2021-07-26 19:35:00 UTC
Awesome! Thank you for the quick fix!
I'm happy to bring some competition to the indicator market :)

A bit of a bummer for the icon scale, but totally understandable.
Once I'm more familiar (and better) with QML and C++, I'd love to try and implement that feature (if it hasn't been implemented by that time) and also help with Latte development.

Thanks again for all your work on this great app!