From 6742321aa1271689535f72f6e9364bb59b3d0fe7 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Mon, 24 Oct 2022 20:14:53 +0800 Subject: [PATCH 1/5] add xapian to the about dialog --- about.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/about.cc b/about.cc index 5e07befa..bd9973db 100644 --- a/about.cc +++ b/about.cc @@ -34,7 +34,11 @@ About::About( QWidget * parent ): QDialog( parent ) ui.qtVersion->setText( tr( "Based on Qt %1 (%2, %3 bit)" ).arg( QLatin1String( qVersion() ), compilerVersion, - QString::number( QSysInfo::WordSize ) ) ); + QString::number( QSysInfo::WordSize ) ) +#ifdef USE_XAPIAN + +" (Xapian inside)" +#endif + ); QFile creditsFile( ":/CREDITS.txt" ); From 6d8779442c605448a99d5a581d3b76de99d6e205 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Tue, 25 Oct 2022 19:46:07 +0800 Subject: [PATCH 2/5] change qt version to qt6.3.2 qt6.4.0 is buggy --- .github/workflows/macos-6.x.yml | 2 +- .github/workflows/macos-homebrew-PR-check.yml | 2 +- .github/workflows/ubuntu-6.2.yml | 2 +- .github/workflows/windows-6.x-xapian.yml | 2 +- .github/workflows/windows-6.x.yml | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/macos-6.x.yml b/.github/workflows/macos-6.x.yml index 8669f579..cbafe439 100644 --- a/.github/workflows/macos-6.x.yml +++ b/.github/workflows/macos-6.x.yml @@ -25,7 +25,7 @@ jobs: strategy: matrix: os: [macos-11] - qt_ver: [6.4.0] + qt_ver: [6.3.2] qt_arch: [clang_64] env: targetName: GoldenDict diff --git a/.github/workflows/macos-homebrew-PR-check.yml b/.github/workflows/macos-homebrew-PR-check.yml index f003d52e..270e3d67 100644 --- a/.github/workflows/macos-homebrew-PR-check.yml +++ b/.github/workflows/macos-homebrew-PR-check.yml @@ -23,7 +23,7 @@ jobs: strategy: matrix: os: [macos-12] - qt_ver: [6.4.0] + qt_ver: [6.3.2] qt_arch: [clang_64] env: targetName: GoldenDict diff --git a/.github/workflows/ubuntu-6.2.yml b/.github/workflows/ubuntu-6.2.yml index e84d5d8d..22061823 100644 --- a/.github/workflows/ubuntu-6.2.yml +++ b/.github/workflows/ubuntu-6.2.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - qt_ver: [6.4.0] + qt_ver: [6.3.2] qt_arch: [gcc_64] env: version: 22.9.24 diff --git a/.github/workflows/windows-6.x-xapian.yml b/.github/workflows/windows-6.x-xapian.yml index a5f4fc63..97d9661f 100644 --- a/.github/workflows/windows-6.x-xapian.yml +++ b/.github/workflows/windows-6.x-xapian.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: os: [windows-2019] - qt_ver: [6.4.0] + qt_ver: [6.3.2] qt_arch: [win64_msvc2019_64] env: targetName: GoldenDict.exe diff --git a/.github/workflows/windows-6.x.yml b/.github/workflows/windows-6.x.yml index fe926f40..148ff24b 100644 --- a/.github/workflows/windows-6.x.yml +++ b/.github/workflows/windows-6.x.yml @@ -27,7 +27,7 @@ jobs: strategy: matrix: os: [windows-2019] - qt_ver: [6.4.0] + qt_ver: [6.3.2] qt_arch: [win64_msvc2019_64] env: targetName: GoldenDict.exe From 971909177662ac78fad6fce5cf206f3a32e8c997 Mon Sep 17 00:00:00 2001 From: xiaoyifang Date: Wed, 26 Oct 2022 16:17:28 +0800 Subject: [PATCH 3/5] fix possible crash in archlinux --- articleview.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/articleview.cc b/articleview.cc index f03d1bd7..8d141f00 100644 --- a/articleview.cc +++ b/articleview.cc @@ -2759,7 +2759,7 @@ void ResourceToSaveHandler::downloadFinished() { if ( (*i)->isFinished() ) { - if ( (*i)->dataSize() >= 0 && !alreadyDone ) + if ( (*i)->dataSize() > 0 && !alreadyDone ) { QByteArray resourceData; vector< char > const & data = (*i)->getFullData(); From 408f9947794589b79487a169554571f98588f16e Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Wed, 26 Oct 2022 21:00:04 +0800 Subject: [PATCH 4/5] revert gico format from webp to png --- article_netmgr.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/article_netmgr.cc b/article_netmgr.cc index 6638d432..1d601274 100644 --- a/article_netmgr.cc +++ b/article_netmgr.cc @@ -335,7 +335,7 @@ sptr< Dictionary::DataRequest > ArticleNetworkAccessManager::getResource( QByteArray bytes; QBuffer buffer(&bytes); buffer.open(QIODevice::WriteOnly); - dictionaries[ x ]->getIcon().pixmap( 64 ).save(&buffer, "webp"); + dictionaries[ x ]->getIcon().pixmap( 64 ).save(&buffer, "PNG"); buffer.close(); sptr< Dictionary::DataRequestInstant > ico = new Dictionary::DataRequestInstant( true ); ico->getData().resize( bytes.size() ); From b23e57d08cd2fbebca19a5d490db0f4d49c1f7e9 Mon Sep 17 00:00:00 2001 From: Xiao YiFang Date: Thu, 27 Oct 2022 21:30:06 +0800 Subject: [PATCH 5/5] fix:rtl display in Arabic/Persian language fix goldendict#1565 --- article-style-st-lingoes-blue.css | 2 +- article-style-st-modern.css | 1 - article-style.css | 6 ++++++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/article-style-st-lingoes-blue.css b/article-style-st-lingoes-blue.css index 36fe519c..c7b53a8c 100644 --- a/article-style-st-lingoes-blue.css +++ b/article-style-st-lingoes-blue.css @@ -141,7 +141,7 @@ h3 { /* The first headword in a (possibly) multi-headword DSL article */ .gdarticlebody > div:first-child .dsl_headwords, -.gdarticlebody > h3:first-child { +{ margin-top: -3px; display: inline-block; } diff --git a/article-style-st-modern.css b/article-style-st-modern.css index 0380b086..b65160af 100644 --- a/article-style-st-modern.css +++ b/article-style-st-modern.css @@ -155,7 +155,6 @@ a:hover /* The first headword in a (possibly) multi-headword DSL article */ .gdarticlebody > div:first-child .dsl_headwords, -.gdarticlebody > h3:first-child { margin-top: -3px; display: inline-block; diff --git a/article-style.css b/article-style.css index f5f09c1e..5d42e4c5 100644 --- a/article-style.css +++ b/article-style.css @@ -9,6 +9,10 @@ body font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Open Sans","Helvetica Neue",sans-serif; } +h1,h2,h3,h4,h5,h6 { + unicode-bidi: plaintext; + text-align: start; +} /* This stylesheet is used to highligh current selection when doing a search. It changes the default selection color (e.g. blue under Windows, orange under Ubuntu) */ @@ -132,6 +136,8 @@ pre /* StarDict type 'h' -- Html content. We don't normally do anything here. */ div.sdct_h { + unicode-bidi: plaintext; + text-align: start; } .sdict_h_wav img