[graphics/krita/krita/6.0] libs/ui/animation: Make animation warning label less ugly and jittery

Carsten Hartenfels <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit abc017c46deb28b0d95d9795741377d42ea78d60 by Carsten Hartenfels.
Committed on 27/07/2026 at 17:19.
Pushed by hartenfels into branch 'krita/6.0'.

Make animation warning label less ugly and jittery

By giving it a less garish icon for its warning sign as well as hiding
and showing it cleanly instead of changing its visibility and then
afterwards setting the text and label.

M  +14   -9    libs/ui/animation/KisDlgAnimationRenderer.cpp
M  +2    -0    libs/ui/animation/KisDlgAnimationRenderer.h

https://invent.kde.org/graphics/krita/-/commit/abc017c46deb28b0d95d9795741377d42ea78d60

diff --git a/libs/ui/animation/KisDlgAnimationRenderer.cpp b/libs/ui/animation/KisDlgAnimationRenderer.cpp
index 6f32e17e173..c0b7ee126d5 100644
--- a/libs/ui/animation/KisDlgAnimationRenderer.cpp
+++ b/libs/ui/animation/KisDlgAnimationRenderer.cpp
@@ -72,6 +72,9 @@ KisDlgAnimationRenderer::KisDlgAnimationRenderer(KisDocument *doc, QWidget *pare
         m_page->bnRenderOptions->setIcon(editIcon);
     }
 
+    m_page->lblWarnings->hide();
+    m_page->lblWarnings->setPixmap(KisIconUtils::loadIcon(QStringLiteral("dialog-warning")).pixmap(32, 32));
+
 #ifdef Q_OS_ANDROID
     m_page->lblVideoFilenameTitle->hide();
     m_page->videoFilename->hide();
@@ -596,6 +599,13 @@ void KisDlgAnimationRenderer::setFFmpegPath(const QString& path) {
 void KisDlgAnimationRenderer::slotCheckWarnings()
 {
     setUpdatesEnabled(false);
+    updateWarnings();
+    m_page->adjustSize();
+    setUpdatesEnabled(true);
+}
+
+void KisDlgAnimationRenderer::updateWarnings()
+{
     QStringList warnings;
     bool exportMayFail = false;
 
@@ -631,9 +641,9 @@ void KisDlgAnimationRenderer::slotCheckWarnings()
         }
     }
 
-    m_page->lblWarnings->setVisible(!warnings.isEmpty());
-
-    if (!warnings.isEmpty()) {
+    if (warnings.isEmpty()) {
+        m_page->lblWarnings->hide();
+    } else {
         QString text = QString("<p><b>%1</b>").arg(i18n("Warning(s):"));
         text.append("<ul>");
         Q_FOREACH (const QString &warning, warnings) {
@@ -650,13 +660,8 @@ void KisDlgAnimationRenderer::slotCheckWarnings()
             text.append(QStringLiteral("</p>"));
         }
         m_page->lblWarnings->setText(text);
-
-        m_page->lblWarnings->setPixmap(
-            m_page->lblWarnings->style()->standardIcon(QStyle::SP_MessageBoxWarning).pixmap(QSize(32, 32)));
+        m_page->lblWarnings->show();
     }
-
-    m_page->adjustSize();
-    setUpdatesEnabled(true);
 }
 
 #ifndef Q_OS_ANDROID
diff --git a/libs/ui/animation/KisDlgAnimationRenderer.h b/libs/ui/animation/KisDlgAnimationRenderer.h
index ce397e77a33..a0fe9c00b5b 100644
--- a/libs/ui/animation/KisDlgAnimationRenderer.h
+++ b/libs/ui/animation/KisDlgAnimationRenderer.h
@@ -91,6 +91,8 @@ private:
 
     void initializeRenderSettings(const KisDocument &doc, const KisAnimationRenderingOptions &lastUsedOptions);
 
+    void updateWarnings();
+
 #ifndef Q_OS_ANDROID
     FFmpegValidationResult validateFFmpeg(const QString &ffmpegPath);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.