fix bug #I7GYTA/#I7GYC4/#I72MZG/#I72MWF/#I72PBL

This commit is contained in:
denghao 2023-08-25 14:03:23 +08:00
parent ee45d7fc96
commit 07971aa2c1
7 changed files with 54 additions and 8 deletions

13
debian/changelog vendored
View File

@ -1,3 +1,16 @@
kylin-photo-viewer (1.3.0.3-ok16) yangtze; urgency=medium
* BUG号: #I7GYTA 【ukui 4】【看图】深色模式看图工具栏图标颜色偏暗
#I7GYC4 【ukui 4】【看图】浅色模式看图工具栏图标颜色偏浅
#I72MZG 【看图】ocr未识别到文字信息“未检测到文本”字样可以被导出
#I72MWF 【看图】看图-关于版本号与dpkg -l查看的版本号不一致
##I72PBL 【不重要】【看图】右上角“三”按钮悬浮提示为菜单,应为选项
* 需求号:无
* 其他改动说明:无
* 影响域:无
-- denghao <denghao@kylinos.cn> Fri, 25 Aug 2023 14:00:26 +0800
kylin-photo-viewer (1.3.0.3-ok15) yangtze; urgency=medium
* BUG号: #I5SXTA #I5TBH5

View File

@ -1680,11 +1680,36 @@ void KyView::setTitleBtnHide()
}
}
QString KyView::getAppVersion()
{
FILE *file = NULL;
char *line = NULL;
size_t size = 0;
ssize_t read;
char *q = NULL;
QString version = nullptr;
file = popen("dpkg -l kylin-photo-viewer", "r");
if(NULL == file)
return version;
while((read = getline(&line, &size, file)) != -1){
q = strrchr(line, '\n');
*q = '\0';
QString content = line;
QStringList list = content.split(" ");
list.removeAll("");
if (list.size() >= 3)
version = list.at(2);
}
free(line);
pclose(file);
return version;
}
void KyView::initAboutDialog()
{
m_aboutDialog->setAppIcon(QIcon::fromTheme("kylin-photo-viewer"));
m_aboutDialog->setAppName(tr("Pictures"));
m_aboutDialog->setAppVersion(tr("Version:") + APP_VERSION_DETAIL);
m_aboutDialog->setAppVersion(tr("Version:")+getAppVersion());
m_aboutDialog->setBodyText(tr("A system picture tool that can quickly open common formats. It provides zoom,flip "
"and other processing simplely."));
}

View File

@ -188,6 +188,7 @@ private:
bool m_recordInfoStateBeforeOtherOperate = false; //信息栏
void restoreAllBallState();
bool m_nowFullScreen = false;
QString getAppVersion();
private Q_SLOTS:

View File

@ -37,7 +37,7 @@ void menuModule::initAction()
m_bodyAppDescribe->setWordWrap(true); //设置自动换行
menuButton = new QToolButton(this);
menuButton->setToolTip(tr("menu"));
menuButton->setToolTip(tr("Option"));
menuButton->setIcon(QIcon::fromTheme("open-menu-symbolic"));
menuButton->setProperty("isWindowButton", 0x1);
menuButton->setProperty("useIconHighlightEffect", 0x2);

View File

@ -735,7 +735,14 @@ void ShowImageWidget::startGetText()
void ShowImageWidget::setGetTextResult(QVector<QString> result)
{
m_ocrWid->setFormatedText(result);
if (result.isEmpty()) {
QString text;
for (QString line : result) {
if (line.isEmpty()) {
continue;
}
text += line + '\n';
}
if (text.isEmpty()) {
m_ocrExportToTxt->setEnabled(false);
} else {
m_ocrExportToTxt->setEnabled(true);

View File

@ -488,7 +488,7 @@ void ToolBar::changeStyle()
//需要重新梳理此处的QSS
nowThemeStyle = kdk::kabase::Gsettings::getSystemTheme().toString();
if ("ukui-dark" == nowThemeStyle || "ukui-black" == nowThemeStyle) {
this->setStyleSheet("QWidget{border-radius:" + widRadius + ";border:none;}");
this->setStyleSheet("QWidget{border-radius:" + widRadius + ";border:none;color:rgb(255,255,255);}");
g_tooleWid->setStyleSheet("QWidget{background-color:rgba(0,0,0,0.66);border-radius:" + widRadius
+ ";border:none;}");
m_zoomWid->setStyleSheet("QWidget{background-color:transparent;border:none;}");
@ -496,7 +496,7 @@ void ToolBar::changeStyle()
m_line1->setStyleSheet("QLabel{border: 1px solid #727272;background-color: #727272;}");
m_line2->setStyleSheet("QLabel{border: 1px solid #727272;background-color: #727272;}");
} else {
this->setStyleSheet("QWidget{border-radius:" + widRadius + ";border:none;}");
this->setStyleSheet("QWidget{border-radius:" + widRadius + ";border:none;color:rgb(0,0,0);}");
m_zoomWid->setStyleSheet("QWidget{background-color:transparent;border:none;}");
g_tooleWid->setStyleSheet("QWidget{background-color:rgba(255,255,255,1);border:none;border-radius:" + widRadius
+ ";}");

View File

@ -517,9 +517,9 @@
<translation>便</translation>
</message>
<message>
<location filename="../src/view/menumodule.cpp" line="35"/>
<source>menu</source>
<translation></translation>
<location filename="../src/view/menumodule.cpp" line="40"/>
<source>Option</source>
<translation></translation>
</message>
<message>
<source>Open..</source>