From 123d6951106fbf25566bd89f9eeb49a881f0bba1 Mon Sep 17 00:00:00 2001 From: shangxiaoyang Date: Thu, 23 May 2024 14:29:49 +0800 Subject: [PATCH 1/2] update changlog --- debian/changelog | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index f69cdfa..98c6142 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,18 @@ +kolourpaint (4:23.08.3-ok3.1) nile; urgency=medium + + * BUG号: + #I9PI10 【次要】【需求27630】【AI画图】生成图片位置下方生成图片未与上方整体显示同步居左显示 + #I9PHXT 【次要】【需求27630】【AI画图】生成的图片宽度不固定 + * 需求号 : 无 + * 其他改动说明 : 无 + * 其他改动影响域 : 无 + + -- shangxiaoyang Thu, 23 May 2024 14:21:05 +0800 + kolourpaint (4:23.08.3-ok3) nile; urgency=medium - * BUG号 : 无 - * 需求号 : TASK AI画图 + * BUG号: 无 + * 需求号: #27630 【百日攻关】【AI攻关】【AI助手】实现画图以文生图功能,生成的图片可以应用于桌面壁纸以及锁屏等场景 * 其他改动说明 : 无 * 其他改动影响域 : 无 From ef9353ee927158d59b29c99f26dfbc4c716e71b9 Mon Sep 17 00:00:00 2001 From: shangxiaoyang Date: Mon, 27 May 2024 14:56:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A7=84=E6=95=B4=E6=8A=A5=E9=94=99?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E5=AD=97=E4=BD=93=E5=A4=A7=E5=B0=8F=E5=92=8C?= =?UTF-8?q?=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 9 +++++++++ widgets/toolbars/kpAiDrawingBar.cpp | 9 ++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/debian/changelog b/debian/changelog index 98c6142..2cd8723 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +kolourpaint (4:23.08.3-ok3.2) nile; urgency=medium + + * BUG号: 无 + * 需求号 : 无 + * 其他改动说明 : 修复报错显示字体大小问题和生成图片形状比例错误问题; + * 其他改动影响域 : 无 + + -- shangxiaoyang Mon, 27 May 2024 14:52:54 +0800 + kolourpaint (4:23.08.3-ok3.1) nile; urgency=medium * BUG号: diff --git a/widgets/toolbars/kpAiDrawingBar.cpp b/widgets/toolbars/kpAiDrawingBar.cpp index 91cf3be..0af3828 100644 --- a/widgets/toolbars/kpAiDrawingBar.cpp +++ b/widgets/toolbars/kpAiDrawingBar.cpp @@ -828,13 +828,16 @@ QPixmap kpAIDrawingBar::createPixmapWithText(const QString &text) // 设置字体和字体大小,这里假设使用默认字体,根据实际需求可自定义 QFont font = painter.font(); + font.setPointSize(12); // 若需要调整字体大小以适应换行,请在此处设置,例如:font.setPointSize(10); + QRect textRect = pixmap.rect().adjusted(8, 8, -8, -8); // 计算文本在给定宽度下的自动换行字符串 - QString wrappedText = fontMetrics().elidedText(i18n(text.toLocal8Bit().data()), Qt::ElideNone, pixmap.rect().width(), Qt::TextWordWrap); + QString wrappedText = fontMetrics().elidedText(i18n(text.toLocal8Bit().data()), Qt::ElideNone, textRect.width(), Qt::TextWordWrap); + painter.setFont(font); painter.setPen(color); - painter.drawText(pixmap.rect(), Qt::AlignCenter | Qt::TextWordWrap, wrappedText); + painter.drawText(textRect, Qt::AlignCenter | Qt::TextWordWrap, wrappedText); painter.end(); qDebug()<<"Error message:"<(showAIImageSize.width()) / static_cast(108); int height = showAIImageSize.height() / ratio; if (height != 0)