Details
- Reviewers
ngraham - Group Reviewers
Plasma - Maniphest Tasks
- T10470: Improve the visuals of tray popups
- Commits
- R97:4a8adbaeac4e: Converted to Page with a PlasmoidHeading in the heading
Diff Detail
- Repository
- R97 Bluedevil
- Branch
- arcpatch-D28467
- Lint
No Linters Available - Unit
No Unit Test Coverage - Build Status
Buildable 25347 Build 25365: arc lint + arc unit
I'm a bit confused by
import org.kde.plasma.components 2.0 as PlasmaComponents import org.kde.plasma.components 3.0 as PlasmaComponents3
is it correct?
Make sure you test how this looks in the System Tray too, and not just as a standalone applet. ;)
src/applet/package/contents/ui/FullRepresentation.qml | ||
---|---|---|
31–32 | PlasmaComponents3.Page doesn't seem to have a heading property. Perhaps you meant header? |
src/applet/package/contents/ui/FullRepresentation.qml | ||
---|---|---|
31–32 | Apparently I managed to test the qml, and then commit an older version of the file, which is broken, and I don't even have the correct version anymore. Yay |
Two lines will appear, but that will soon be corrected by another patch that I'm working on (1/2 days and should be ready)
So here's what I see in the system tray popup:
The toolbar doesn't touch the edges of its surroundings, so there's a differently-colored margin around it.
It's correct, because the systray has clipping disabled. But fear not, as D28575 is here :P
Looking good. I see two remaining visual issues:
- There's an extra one-pixel line above the section header text that touches the bottom line of the applet's header:
- When Bluetooth is disabled, there's an extra header row with nothing on it:
I need a small help for the second one. When there's no toolbar, the toolbar.visible is set to false; otherwise, it's true. But when I'm in the systemtray and I try to check activeApplet.fullRepresentationItem.header.visible, it always returns false. What could that be?
Yes. I tried to console log it (...header) and it returns Toolbar qml element, which is correct, and the element supposed to have the visible property.
This'll need a rebase, as I landed the ExpandableListItem port a few days ago.
src/applet/package/contents/ui/FullRepresentation.qml | ||
---|---|---|
31–32 | the visibility should be dependent on it having any items in it; or else it's still visible when Bluetooth is disabled. |
src/applet/package/contents/ui/FullRepresentation.qml | ||
---|---|---|
31–32 | I though that was done by toolbar.visible = (state == "DevicesState" || state == "NoDevicesState"); At the end of the file. If you try to use the widget standalone, you will notice that it does disappear. Problem is, system tray doesn't notice. I can't understand why it doesn't read the ".visible" property. |
src/applet/package/contents/ui/FullRepresentation.qml | ||
---|---|---|
31–32 | It's because the binding is broken. In QML, there are two ways to change a property: with a binding, or imperatively. A binding uses a colon, and looks like this: visible: (state == "DevicesState" || state == "NoDevicesState") You want to use binding as much as possible because the property being bound (visible) will auto-update when the condition changes. Imparative code uses an equals sign: toolbar.visible = (state == "DevicesState" || state == "NoDevicesState"); This breaks any existing bindings, which means you become responsible for manually updating the property in question toolbar.visible whenever you want it to change. Theoretically that's taken care of by onStateChanged: but for some reason it doesn't seem to be working. Perhaps there's a state not accounted for there? In general I don't like using explicit States though. I find that it leads to messy, imperative code. |
Hmm, seems broke:
file:///home/nate/kde/usr/share/plasma/plasmoids/org.kde.plasma.bluetooth/contents/ui/FullRepresentation.qml:145:1: Expected token `}'
Sorry, I actually broke it in my attempt to rebase it so that it lands. You need to do the rebase on top of master:
git checkout master git pull git checkout [your branch] git pull --rebase origin master arc diff