Closed Almtesh closed 3 years ago
I tryed to look at this code I don't know in a language I don't know, is my problem related to lines 189 to 199 property in package/content/ui/main.qml? I don't know what you mean in "FixedWidth".
Fixed width/height is hidden for desktop widgets as it sets Layout.preferredWidth
which will set the width in the panel. For a desktop widget, Layout.preferredWidth
is ignored. I don't set Layout.maximumWidth
as it wasn't necessary.
What's probably happening is that your output has lots of extra spaces after the text before the newline?
Though I just tried it in manjaro. For some reason it wouldn't shrink smaller than this height at first. I could change the width no problem.
After a few seconds I could shrink it a little bit smaller:
Then finally I could shrink it to:
However after a few seconds it resized automatically to this. Probably after the command ran again and the text was updated.
My guess is that Text.implicitWidth
uses up as much width as possible if there's a newline. Perhaps I should use Text.contentWidth
.
Surely, I don't know QML.
For info, my command is upsc ups@nut-server | grep -E 'battery.charge:|input.frequency:|input.voltage:|output.frequency:|output.voltage:|ups.power:|ups.realpower:'
. When I execute is on a shell, I don't get extra spaces before new lines.
Actually, I think you might do two things:
Hello,
Do you need about that? I could try to get a look on it, if you want.
Sorry, I fixed it pretty quick, but wanted to test it overnight + after restarting and forgot about pushing the release. Should be fixed in v11.
I hate myself asking you that, but how can I install the new version? I can't find the updater.
If you go to "Add Widgets > Get New Widget > Download", the GUI should be able Update the widget. If that doesn't work (there's recently been a bug), then download the git repo and run:
kpackagetool5 --type=Plasma/Applet --upgrade ./package/
OK, thanks, widget updated and working as expected.
Hello,
I installed this widget on Plasma 5.18.5 on Kubuntu 20.04 and I have a problem on the size of the widget. Every time the command executes, the widget can be resized randomly. Sometime, the new size makes the widget to put itself over or under another widget.
The text in this instance does not really change, but I can't get it smaller for a long time.
I saw in the code that there is an option to stabilise the size, but the option does not appear in the settings:![Screenshot_20201005_214758](https://user-images.githubusercontent.com/8816946/95124917-76fef600-0754-11eb-91ae-60cb47fc159e.png)