[education/rkward] /: Also allow preview window to be downsized again, in the presence of long error messages.
Thomas Friedrichsmeier
null at kde.org
Tue Jun 21 21:29:29 BST 2022
Git commit 41e82be363eb1be3046cd87417b2458b18ab6f6c by Thomas Friedrichsmeier.
Committed on 21/06/2022 at 20:28.
Pushed by tfry into branch 'master'.
Also allow preview window to be downsized again, in the presence of long error messages.
M +1 -0 ChangeLog
M +2 -0 rkward/windows/rkmdiwindow.cpp
https://invent.kde.org/education/rkward/commit/41e82be363eb1be3046cd87417b2458b18ab6f6c
diff --git a/ChangeLog b/ChangeLog
index 97b54d41..3089e616 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,4 @@
+- Fixed: Very long error messages during R markdown preview could cause the preview window to become too wide
- Many new basic and advanced R, R Markdown and LaTeX snippets
- Complex R Markdown template part of the snippets
- Provide tooltips on symbols in scripts and R console
diff --git a/rkward/windows/rkmdiwindow.cpp b/rkward/windows/rkmdiwindow.cpp
index 8cf43877..42c63a52 100644
--- a/rkward/windows/rkmdiwindow.cpp
+++ b/rkward/windows/rkmdiwindow.cpp
@@ -356,6 +356,7 @@ void RKMDIWindow::showStatusMessageNow() {
if (!status_message.isEmpty ()) {
status_popup_container->resize (size ());
status_popup_container->setMaximumWidth(width()); // also in resizeEvent(). Without this, extra long messages could force the whole preview window to resize, taking up all horziontal space.
+ status_popup_container->setMinimumWidth(width()/2);
status_popup_container->show ();
if (status_popup->text () == status_message) {
if (!status_popup->isVisible ()) status_popup->animatedShow (); // it might have been closed by user. And no, simply show() is _not_ good enough. KF5 (5.15.0)
@@ -398,6 +399,7 @@ void RKMDIWindow::clearStatusMessage () {
void RKMDIWindow::resizeEvent (QResizeEvent*) {
if (status_popup_container && status_popup_container->isVisible ()) {
status_popup_container->setMaximumWidth(width());
+ status_popup_container->setMinimumWidth(width()/2);
status_popup_container->resize(QSize(width(), status_popup->height () + 20));
}
}
More information about the rkward-tracker
mailing list