![]() Registered Member ![]()
|
I'm writing an activity switcher plasmoid. It displays the activity icon in a GridView. When you click the icon, it switches to the proper activity. I'd like the current activity to be highlighted, using the highlight property built into GridView. I've got it so that when I click, the highlight follows the click. But I cannot figure out how to get the GridView.currentIndex to stay in sync with the current activity (for example, on intial login, or switching activities with Win+Tab.).
(I am able to get the highlight to work by recreating the highlight box manually in my delegate, but then I lose the animation features from the GridView builtin, so I'd rather use that if possible) It seems like the ActivityModel should have an onCurrentActivityChanged event that I could use, or a currentActivity property that returns the activity ID, but neither of those appears to exist. (actually, onCurrentActivityChanged exists - it's just private.) I've copied what I believe to be the relevant code below:
And my Delegate component
Is there a way to get from where I am to where I want to go?
Timmer, proud to be a member of KDE forums since 2008-Nov.
|
Registered users: abc72656, Bing [Bot], daret, Google [Bot], Sogou [Bot], Yahoo [Bot]