Closed trekjunky closed 5 years ago
What distro? What screen resolution? Are you using the default system font size?
OpenSuSE Leap 15.1 Screen Resolution of 3840X2160 Not the default font size. I made the fonts larger because my eye sight is bad.
I deleted rm -R ~/.local/share/plasma/plasmoids/com.github.zren.simpleweather/ and ran ./install from the git hub clone. It took just a second, and the widget works now, BUT when I resize it, It crashes KDE. I do a CTRL+ESC and find the Kmserver and end process on it and it logs me out and I loge back in and try it again and it crashes KDE. I recently was forced to do a fresh install from DVD of OpenSuSE Leap 15.1. I am at my wits end. P.S. About the Default Font, yes, but I went into Desktop Settings Configuration and set the fonts to larger size.
How do I completely remove Simple Weather Widget, so that I can start from scratch? I want to remove ALL settings and files...
So a HiDPI screen. What font size exactly?
Deleting the simpleweather directory like you did in the other issue should work. If you want to reset the widget/panels then delete ~/.config/plasmashellrc
and ~/.config/plasma-org.kde.plasma.desktop-appletsrc
while plasma isn't running. A simpler way to reset the panels would be choosing a look and feel and checking the "use desktop layout from theme".
I did this: delete ~/.config/plasmashellrc and ~/.config/plasma-org.kde.plasma.desktop-appletsrc while plasma isn't running. Logged back in and got the default desktop. Before I rebuilt my preferred configuration of KDE, I used the Plasmoid Installer off the desktop to install Simple Weather. It installed fine. I added it to my desktop. I tried to resize it again and IT CRASHED KDE AGAIN. Please help!?!?!?!?!?!?!?
There's a bug you're encountering. I can't reproduce it so I'll need to download and test an opensuse livecd later. For now, you will be unable to use this widget.
I love your widget, so I resized it as much as I can BEFORE it crashes KDE, but it is too small still. I would like to get a solution when it is available. Until then I will continue to use it at the size it is now. I really appreciate your time and effort. I do not have much money, but I will donate a small amount to help support your product.
I have searched high and low on how to donate to your project, but I could not find a way to donate to you specifically. Can you advise me on how to accomplish this? P.S. I have lots of family in Toronto. I am in the Detroit Area. I can call you neighbor.
I can reproduce it, https://www.youtube.com/watch?v=Atza6ISbQXA but I've no idea why QML crashes when the pixelSize is >330. There's gotta be a Qt bug here. Or just an undocumented limit. It's hard to be certain what line of code is causing the crash as the LiveCD doesn't have "Dr Konqi" setup to see the stacktrace.
OpenSuse Leap 15.1 is using an older version of Qt (5.9.x) so that could be why I can't reproduce the bug in Manjaro (which has Qt 5.12.x).
There mention of recursion in updateSize()
, so that might be it.
Actually, now that I think of it, in Manjaro, when I make the text about 330px tall, the numbers disappear. The degree symbol is still drawn, but not the numbers.
I may have to set an artificial limit of 320px tall text. Which would only look "160px" tall on a HiDPI display like yours.
I should note that I am using a workaround to draw that text. I'm using a "trick" to remove the top/bottom padding around the temperature text. Suse's plasmashell crashed even when I removed the workaround however.
Either my size code is causing a recursion bug, or it's a QML bug.
void QQuickTextPrivate::updateSize()
{
Q_Q(QQuickText);
@@ -359,8 +366,8 @@ void QQuickTextPrivate::updateSize()
}
if (!requireImplicitSize) {
- emit q->implicitWidthChanged();
- emit q->implicitHeightChanged();
+ implicitWidthChanged();
+ implicitHeightChanged();
// if the implicitWidth is used, then updateSize() has already been called (recursively)
if (requireImplicitSize)
return;
@@ -369,6 +376,8 @@ void QQuickTextPrivate::updateSize()
qreal hPadding = q->leftPadding() + q->rightPadding();
qreal vPadding = q->topPadding() + q->bottomPadding();
+ const QSizeF previousSize = layedOutTextRect.size();
+
if (text.isEmpty() && !isLineLaidOutConnected() && fontSizeMode() == QQuickText::FixedSize) {
// How much more expensive is it to just do a full layout on an empty string here?
// There may be subtle differences in the height and baseline calculations between
@@ -384,14 +393,14 @@ void QQuickTextPrivate::updateSize()
updateBaseline(fm.ascent(), q->height() - fontHeight - vPadding);
q->setImplicitSize(hPadding, fontHeight + vPadding);
layedOutTextRect = QRectF(0, 0, 0, fontHeight);
- emit q->contentSizeChanged();
+ advance = QSizeF();
+ signalSizeChange(previousSize);
updateType = UpdatePaintNode;
q->update();
return;
}
QSizeF size(0, 0);
- QSizeF previousSize = layedOutTextRect.size();
//setup instance of QTextLayout for all cases other than richtext
if (!richText) {
@@ -433,7 +442,7 @@ void QQuickTextPrivate::updateSize()
if (internalWidthUpdate)
return;
- extra->doc->setPageSize(QSizeF());
+ extra->doc->setPageSize(QSizeF(q->width(), -1));
if (q->widthValid() && (wrapMode != QQuickText::NoWrap || extra->doc->idealWidth() < availableWidth()))
extra->doc->setTextWidth(availableWidth());
else
@@ -448,6 +457,7 @@ void QQuickTextPrivate::updateSize()
//### need to confirm cost of always setting these for richText
internalWidthUpdate = true;
+ qreal oldWidth = q->width();
qreal iWidth = -1;
if (!q->widthValid())
iWidth = size.width();
@@ -455,18 +465,45 @@ void QQuickTextPrivate::updateSize()
q->setImplicitSize(iWidth + hPadding, size.height() + vPadding);
internalWidthUpdate = false;
- if (iWidth == -1)
- q->setImplicitHeight(size.height() + vPadding);
+ // If the implicit width update caused a recursive change of the width,
+ // we will have skipped integral parts of the layout due to the
+ // internalWidthUpdate recursion guard. To make sure everything is up
+ // to date, we need to run a second pass over the layout when updateSize()
+ // is done.
+ if (!qFuzzyCompare(q->width(), oldWidth) && !updateSizeRecursionGuard) {
+ updateSizeRecursionGuard = true;
+ updateSize();
+ updateSizeRecursionGuard = false;
+ } else {
+ if (iWidth == -1)
+ q->setImplicitHeight(size.height() + vPadding);
+
+ QTextBlock firstBlock = extra->doc->firstBlock();
+ while (firstBlock.layout()->lineCount() == 0)
+ firstBlock = firstBlock.next();
+
+ QTextBlock lastBlock = extra->doc->lastBlock();
+ while (lastBlock.layout()->lineCount() == 0)
+ lastBlock = lastBlock.previous();
+
+ if (firstBlock.lineCount() > 0 && lastBlock.lineCount() > 0) {
+ QTextLine firstLine = firstBlock.layout()->lineAt(0);
+ QTextLine lastLine = lastBlock.layout()->lineAt(lastBlock.layout()->lineCount() - 1);
+ advance = QSizeF(lastLine.horizontalAdvance(),
+ (lastLine.y() + lastBlock.layout()->position().y()) - (firstLine.y() + firstBlock.layout()->position().y()));
+ } else {
+ advance = QSizeF();
+ }
+ }
}
- if (layedOutTextRect.size() != previousSize)
- emit q->contentSizeChanged();
+ signalSizeChange(previousSize);
updateType = UpdatePaintNode;
q->update();
}
I wish I knew KDe/Linux enough to help you troubleshoot this issue. Should I replace the qquicktext.cpp file with what your shared here? You know, I will try it whether you need me to or not. I will use the 5.9 version to see if it makes a difference.
P.S. I can install Dr. Konqi on my system and copy logs for you if that will help. Save you the trouble of installing OpenSuSE Leap 15.1. Please let me know what to do with Dr. Konqi
I just found out that Dr. Konqi is already installed. It is version 5.12.8
Well, I couldn't figure out how to overwrite qquicktext.cpp. Or is it qquicktext.h? Either way, it is not on my system. This is the closest I could find:
prise:/ # find -depth -iname qquicktextdoc* ./usr/share/sip/PyQt5/QtQuick/qquicktextdocument.sip ./usr/include/qt5/QtQuick/QQuickTextDocument ./usr/include/qt5/QtQuick/qquicktextdocument.h
prise:/ # find -depth -iname qquicktext_p* ./home/timeshift/snapshots/2019-05-31_17-28-35/localhost/usr/include/qt5/QtQuick/5.9.4/QtQuick/private/qquicktext_p.h ./home/timeshift/snapshots/2019-05-31_17-28-35/localhost/usr/include/qt5/QtQuick/5.9.4/QtQuick/private/qquicktext_p_p.h
The _p_p.h and the _p.h files USED to be there, but are not there anymore as shown in my backup program TimeShift shows.
Also In case it matters, in my software management program YAST, QtQuick is at version:
file description available installed libQtQuick5 │Qt 5 Declarative Library │5.9.7 │5.9.7
I can also get the file list from YAST which I copied here: ` libQtQuick5 - Qt 5 Declarative Library
/usr/lib64/libQt5Qml.so.5 /usr/lib64/libQt5Qml.so.5.9 /usr/lib64/libQt5Qml.so.5.9.7 /usr/lib64/libQt5Quick.so.5 /usr/lib64/libQt5Quick.so.5.9 /usr/lib64/libQt5Quick.so.5.9.7 /usr/lib64/libQt5QuickParticles.so.5 /usr/lib64/libQt5QuickParticles.so.5.9 /usr/lib64/libQt5QuickParticles.so.5.9.7 /usr/lib64/libQt5QuickTest.so.5 /usr/lib64/libQt5QuickTest.so.5.9 /usr/lib64/libQt5QuickTest.so.5.9.7 /usr/lib64/libQt5QuickWidgets.so.5 /usr/lib64/libQt5QuickWidgets.so.5.9 /usr/lib64/libQt5QuickWidgets.so.5.9.7 /usr/lib64/qt5/plugins/qmltooling /usr/lib64/qt5/plugins/qmltooling/libqmldbg_debugger.so /usr/lib64/qt5/plugins/qmltooling/libqmldbg_inspector.so /usr/lib64/qt5/plugins/qmltooling/libqmldbg_local.so /usr/lib64/qt5/plugins/qmltooling/libqmldbg_messages.so /usr/lib64/qt5/plugins/qmltooling/libqmldbg_native.so /usr/lib64/qt5/plugins/qmltooling/libqmldbg_nativedebugger.so /usr/lib64/qt5/plugins/qmltooling/libqmldbg_profiler.so /usr/lib64/qt5/plugins/qmltooling/libqmldbg_quickprofiler.so /usr/lib64/qt5/plugins/qmltooling/libqmldbg_server.so /usr/lib64/qt5/plugins/qmltooling/libqmldbg_tcp.so /usr/lib64/qt5/qml /usr/lib64/qt5/qml/Qt /usr/lib64/qt5/qml/Qt/labs /usr/lib64/qt5/qml/Qt/labs/folderlistmodel /usr/lib64/qt5/qml/Qt/labs/folderlistmodel/libqmlfolderlistmodelplugin.so /usr/lib64/qt5/qml/Qt/labs/folderlistmodel/plugins.qmltypes /usr/lib64/qt5/qml/Qt/labs/folderlistmodel/qmldir /usr/lib64/qt5/qml/Qt/labs/settings /usr/lib64/qt5/qml/Qt/labs/settings/libqmlsettingsplugin.so /usr/lib64/qt5/qml/Qt/labs/settings/plugins.qmltypes /usr/lib64/qt5/qml/Qt/labs/settings/qmldir /usr/lib64/qt5/qml/Qt/labs/sharedimage /usr/lib64/qt5/qml/Qt/labs/sharedimage/libsharedimageplugin.so /usr/lib64/qt5/qml/Qt/labs/sharedimage/qmldir /usr/lib64/qt5/qml/QtQml /usr/lib64/qt5/qml/QtQml/Models.2 /usr/lib64/qt5/qml/QtQml/Models.2/libmodelsplugin.so /usr/lib64/qt5/qml/QtQml/Models.2/plugins.qmltypes /usr/lib64/qt5/qml/QtQml/Models.2/qmldir /usr/lib64/qt5/qml/QtQml/StateMachine /usr/lib64/qt5/qml/QtQml/StateMachine/libqtqmlstatemachine.so /usr/lib64/qt5/qml/QtQml/StateMachine/plugins.qmltypes /usr/lib64/qt5/qml/QtQml/StateMachine/qmldir /usr/lib64/qt5/qml/QtQml/plugins.qmltypes /usr/lib64/qt5/qml/QtQml/qmldir /usr/lib64/qt5/qml/QtQuick /usr/lib64/qt5/qml/QtQuick.2 /usr/lib64/qt5/qml/QtQuick.2/libqtquick2plugin.so /usr/lib64/qt5/qml/QtQuick.2/plugins.qmltypes /usr/lib64/qt5/qml/QtQuick.2/qmldir /usr/lib64/qt5/qml/QtQuick/Layouts /usr/lib64/qt5/qml/QtQuick/Layouts/libqquicklayoutsplugin.so /usr/lib64/qt5/qml/QtQuick/Layouts/plugins.qmltypes /usr/lib64/qt5/qml/QtQuick/Layouts/qmldir /usr/lib64/qt5/qml/QtQuick/LocalStorage /usr/lib64/qt5/qml/QtQuick/LocalStorage/libqmllocalstorageplugin.so /usr/lib64/qt5/qml/QtQuick/LocalStorage/plugins.qmltypes /usr/lib64/qt5/qml/QtQuick/LocalStorage/qmldir /usr/lib64/qt5/qml/QtQuick/Particles.2 /usr/lib64/qt5/qml/QtQuick/Particles.2/libparticlesplugin.so /usr/lib64/qt5/qml/QtQuick/Particles.2/plugins.qmltypes /usr/lib64/qt5/qml/QtQuick/Particles.2/qmldir /usr/lib64/qt5/qml/QtQuick/Window.2 /usr/lib64/qt5/qml/QtQuick/Window.2/libwindowplugin.so /usr/lib64/qt5/qml/QtQuick/Window.2/plugins.qmltypes /usr/lib64/qt5/qml/QtQuick/Window.2/qmldir /usr/lib64/qt5/qml/QtQuick/XmlListModel /usr/lib64/qt5/qml/QtQuick/XmlListModel/libqmlxmllistmodelplugin.so /usr/lib64/qt5/qml/QtQuick/XmlListModel/plugins.qmltypes /usr/lib64/qt5/qml/QtQuick/XmlListModel/qmldir /usr/lib64/qt5/qml/builtins.qmltypes /usr/share/doc/packages/libQtQuick5 /usr/share/doc/packages/libQtQuick5/LICENSE.FDL /usr/share/doc/packages/libQtQuick5/LICENSE.GPL2 /usr/share/doc/packages/libQtQuick5/LICENSE.GPL3 /usr/share/doc/packages/libQtQuick5/LICENSE.GPL3-EXCEPT /usr/share/doc/packages/libQtQuick5/LICENSE.LGPL3
83 files total `
@trekjunky
A more easy workaround for you is to edit the plasma config file at ~/.config/plasma-org.kde.plasma.desktop-appletsrc
, you could resize and position the widget there.
Please ignore the mention of qquicktext.cpp
. I wrote those down as notes for me the developer, not you the user.
@trekjunky A more easy workaround for you is to edit the plasma config file at
~/.config/plasma-org.kde.plasma.desktop-appletsrc
, you could resize and position the widget there.
I tried editting it where it said about Simple Weather height and depth, then logged off and back in, BUT it didn't work. Maybe I didn't edit the correct lines?
Will anyone offer the correct answer?
Maybe I didn't edit the correct lines?
Sure. There is a line contains ItemsGeometries
or something like that. You have to edit that line, not the line contains the width/height words.
Sure. There is a line contains
ItemsGeometries
or something like that. You have to edit that line, not the line contains the width/height words. I did it and logged in and it crashed KDE. It definitely resized it, but I repeat, it crashed KDE. I had to do a CTRL+ALT+F2 and use vi to edit the file so that it wouldn't crash KDE again. Then I logged in again and it was smaller, but KDE was fine. Anyone with the correct answer? Or another thing to try?
Can you test in a new account? Sounds weird.
It's a rendering bug that I can reproduce in Manjaro. Except that in Manjaro, it stops drawing text with a font.pixelSize: 330
instead of crashing.
Either QML doesn't like how I've done the layout, or there's a bug in QML with really large text.
@trekjunky: I need to spend a few hours of trial and error, removing/changing the widget, to learn what's causing the bug. There is nothing you can do at this moment to fix it. Either use a pixel size smaller than 320px (which only looks about 160px on HiDPI) or don't use the widget until I fix it.
It's a rendering bug that I can reproduce in Manjaro. Except that in Manjaro, it stops drawing text with a
font.pixelSize: 330
instead of crashing.Either QML doesn't like how I've done the layout, or there's a bug in QML with really large text.
@trekjunky: I need to spend a few hours of trial and error, removing/changing the widget, to learn what's causing the bug. There is nothing you can do at this moment to fix it. Either use a pixel size smaller than 320px (which only looks about 160px on HiDPI) or don't use the widget until I fix it.
I will use it as is. I will wait with anticipation for the solution. You never answered my donation question. I watched a Git Hub Announcement that said the public will be able to donate to the developers somehow, but I don't know how.
What if you add renderType: Text.QtRendering
property to that label? It's currently drawing using the default Qt.NativeRendering
which doesn't seem to draw at very large sizes in Manjaro (and apparently crashes in OpsenSuse). When I tested using the CPU/software drawn Text.QtRendering
, it drew properly.
~/.local/share/plasma/plasmoids/com.github.zren.simpleweather/contents/ui/CurrentWeatherView.qml
id: currentTempLabel
Label
https://github.com/Zren/plasma-applet-simpleweather/blob/master/package/contents/ui/CurrentWeatherView.qml#L78-L92renderType: Text.QtRendering
plasmawindowed com.github.zren.simpleweather
plasmashell
process).Thanks so much. I will get a chance to try it tomorrow or the next day. I will let you know ASAP whether it worked or not. Thanks again!!!!!
Cane Kostovski www.pc-tamer.com
“Here, where a thousand Captains swore grand conquest. . .Tall Grass their monument.” ― Basho
"Too many people are beacons of light with hate for others... If only some of that light would shine on them showing them as they are, NOT as they wish they were!!!!!" ― Cane Kostovski
Sent with ProtonMail Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Tuesday, July 9, 2019 8:14 PM, Chris Holland notifications@github.com wrote:
What if you add renderType: Text.QtRendering property to that label? It's currently drawing using the default Qt.NativeRendering which doesn't seem to draw at very large sizes in Manjaro (and apparently crashes in OpsenSuse). When I tested using the CPU/software drawn Text.QtRendering, it drew properly.
Open up ~/.local/share/plasma/plasmoids/com.github.zren.simpleweather/contents/ui/CurrentWeatherView.qml
Find the id: currentTempLabel Label https://github.com/Zren/plasma-applet-simpleweather/blob/master/package/contents/ui/CurrentWeatherView.qml#L78-L92
Add renderType: Text.QtRendering
Test using plasmawindowed com.github.zren.simpleweather
To reload your desktop, relog (or restart the plasmashell process).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Thanks! It worked!!!!!!!!!!!!! Close the case
Cane Kostovski www.pc-tamer.com
“Here, where a thousand Captains swore grand conquest. . .Tall Grass their monument.” ― Basho
"Too many people are beacons of light with hate for others... If only some of that light would shine on them showing them as they are, NOT as they wish they were!!!!!" ― Cane Kostovski
Sent with ProtonMail Secure Email.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Tuesday, July 9, 2019 8:14 PM, Chris Holland notifications@github.com wrote:
What if you add renderType: Text.QtRendering property to that label? It's currently drawing using the default Qt.NativeRendering which doesn't seem to draw at very large sizes in Manjaro (and apparently crashes in OpsenSuse). When I tested using the CPU/software drawn Text.QtRendering, it drew properly.
Open up ~/.local/share/plasma/plasmoids/com.github.zren.simpleweather/contents/ui/CurrentWeatherView.qml
Find the id: currentTempLabel Label https://github.com/Zren/plasma-applet-simpleweather/blob/master/package/contents/ui/CurrentWeatherView.qml#L78-L92
Add renderType: Text.QtRendering
Test using plasmawindowed com.github.zren.simpleweather
To reload your desktop, relog (or restart the plasmashell process).
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.
Issue resolved
Note: This bug is still reproducible in other widgets.
https://old.reddit.com/r/kde/comments/rtllvs/recently_released_my_very_first_plasma_widget/hqtvnln/
So the workaround is still required. No idea about Qt6 behavior.
From the Journal:
Please help!