feat: add font customization (#973)

* action: auto clang format changes

action: clang-format

* feat: add separator tab to configure the font family for the web engine.

feat: custom fonts

feat: add custom font

i18n: update crowdin translation files

* [autofix.ci] apply automated fixes

* feat: add notice about the font customization

* feat: adjust interface layout

* i18n: update transaltion source

* fix: code smells

* feat: custom font layout adjustment

* i18n: update translation items

* feat: adjust layout of custom fonts

* i18n: new

* feat: adjust layout

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
xiaoyifang 2023-07-16 18:54:07 +08:00 committed by GitHub
parent 534d8c2e96
commit ce8b8a60bb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 752 additions and 511 deletions

View file

@ -28,7 +28,7 @@ jobs:
fetch-depth: 2
# format the latest commit
- name: ubuntu install clang-format
if: ${{ github.event.pull_request.head.repo.full_name == 'xiaoyifang/goldendict-ng' }}
# if: ${{ github.event.pull_request.head.repo.full_name == 'xiaoyifang/goldendict-ng' }}
id: clang-format
run: |
sudo apt-get install git lsb-release wget software-properties-common
@ -37,13 +37,6 @@ jobs:
sudo apt-get install -y clang-format
git-clang-format --style=file HEAD^
- uses: EndBug/add-and-commit@v9
if: ${{ github.event.pull_request.head.repo.full_name == 'xiaoyifang/goldendict-ng' }}
with:
default_author: github_actor
message: 🎨 apply clang-format changes
- uses: autofix-ci/action@89762f9c25dd85f6b78cd40e521232e403357ec0

4
locale/.clang-format Normal file
View file

@ -0,0 +1,4 @@
---
DisableFormat: true
SortIncludes: Never
...

View file

@ -186,33 +186,33 @@
<context>
<name>ArticleView</name>
<message>
<location filename="../src/ui/articleview.cc" line="1928"/>
<location filename="../src/ui/articleview.cc" line="1929"/>
<source>Failed to create temporary file.</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1639"/>
<location filename="../src/ui/articleview.cc" line="1640"/>
<source>&amp;Look up &quot;%1&quot;</source>
<translation> &quot;%1&quot;(&amp;L)</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1647"/>
<location filename="../src/ui/articleview.cc" line="1648"/>
<source>Look up &quot;%1&quot; in &amp;New Tab</source>
<translation> &quot;%1&quot;(&amp;N)</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1214"/>
<location filename="../src/ui/articleview.cc" line="1391"/>
<location filename="../src/ui/articleview.cc" line="1215"/>
<location filename="../src/ui/articleview.cc" line="1392"/>
<source>The referenced resource doesn&apos;t exist.</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1939"/>
<location filename="../src/ui/articleview.cc" line="1940"/>
<source>Failed to auto-open resource file, try opening manually: %1.</source>
<translation>%1.</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1673"/>
<location filename="../src/ui/articleview.cc" line="1674"/>
<source>Look up &quot;%1&quot; in %2</source>
<translation> %2 &quot;%1&quot;</translation>
</message>
@ -232,105 +232,105 @@
<translation></translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1681"/>
<location filename="../src/ui/articleview.cc" line="1682"/>
<source>Look up &quot;%1&quot; in %2 in &amp;New Tab</source>
<translation> %2 &quot;%1&quot; 使(&amp;N)</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1597"/>
<location filename="../src/ui/articleview.cc" line="1598"/>
<source>Open Link in New &amp;Tab</source>
<translation>(&amp;T)</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1604"/>
<location filename="../src/ui/articleview.cc" line="1605"/>
<source>Open Link in &amp;External Browser</source>
<translation>(&amp;E)</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="854"/>
<location filename="../src/ui/articleview.cc" line="855"/>
<source>Resource</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="859"/>
<location filename="../src/ui/articleview.cc" line="860"/>
<source>Audio</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="864"/>
<location filename="../src/ui/articleview.cc" line="865"/>
<source>TTS Voice</source>
<translation>TTS </translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="869"/>
<location filename="../src/ui/articleview.cc" line="870"/>
<source>Picture</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="876"/>
<location filename="../src/ui/articleview.cc" line="877"/>
<source>Video</source>
<translatorcomment>: %1</translatorcomment>
<translation></translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="885"/>
<location filename="../src/ui/articleview.cc" line="886"/>
<source>Video: %1</source>
<translation>%1</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="902"/>
<location filename="../src/ui/articleview.cc" line="903"/>
<source>Definition from dictionary &quot;%1&quot;: %2</source>
<translation>&quot;%1&quot;: %2</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="910"/>
<location filename="../src/ui/articleview.cc" line="911"/>
<source>Definition: %1</source>
<translation>%1</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1249"/>
<location filename="../src/ui/articleview.cc" line="1250"/>
<source>The referenced audio program doesn&apos;t exist.</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1591"/>
<location filename="../src/ui/articleview.cc" line="1592"/>
<source>Op&amp;en Link</source>
<translation>(&amp;E)</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1692"/>
<location filename="../src/ui/articleview.cc" line="1693"/>
<source>Save &amp;Bookmark &quot;%1...&quot;</source>
<translation>&amp;S%1...</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1969"/>
<location filename="../src/ui/articleview.cc" line="1970"/>
<source>WARNING: Audio Player: %1</source>
<translation>%1</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1139"/>
<location filename="../src/ui/articleview.cc" line="1174"/>
<location filename="../src/ui/articleview.cc" line="1391"/>
<location filename="../src/ui/articleview.cc" line="1140"/>
<location filename="../src/ui/articleview.cc" line="1175"/>
<location filename="../src/ui/articleview.cc" line="1392"/>
<source>ERROR: %1</source>
<translation> %1</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1841"/>
<location filename="../src/ui/articleview.cc" line="1842"/>
<source>Save sound</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1856"/>
<location filename="../src/ui/articleview.cc" line="1857"/>
<source>Save image</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1858"/>
<location filename="../src/ui/articleview.cc" line="1859"/>
<source>Image files (*.bmp *.jpg *.png *.tif);;All files (*.*)</source>
<translation> (*.bmp *.jpg *.png *.tif);; (*.*)</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1620"/>
<location filename="../src/ui/articleview.cc" line="1621"/>
<source>Save &amp;image...</source>
<translation>(&amp;I)...</translation>
</message>
@ -345,38 +345,38 @@
<translation>%1/%2</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1627"/>
<location filename="../src/ui/articleview.cc" line="1628"/>
<source>Save s&amp;ound...</source>
<translation>(&amp;O)...</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1652"/>
<location filename="../src/ui/articleview.cc" line="1653"/>
<source>Send &quot;%1&quot; to input line</source>
<translation> &quot;%1&quot; </translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1658"/>
<location filename="../src/ui/articleview.cc" line="1710"/>
<location filename="../src/ui/articleview.cc" line="1659"/>
<location filename="../src/ui/articleview.cc" line="1711"/>
<source>&amp;Add &quot;%1&quot; to history</source>
<translation> &quot;%1&quot; (&amp;A)</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1700"/>
<location filename="../src/ui/articleview.cc" line="1701"/>
<source>&amp;Send Current Article to Anki</source>
<translation> Anki(&amp;S)</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1701"/>
<location filename="../src/ui/articleview.cc" line="1702"/>
<source>&amp;Send selected text to Anki</source>
<translation> Anki(&amp;S)</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1843"/>
<location filename="../src/ui/articleview.cc" line="1844"/>
<source>Sound files (*.wav *.opus *.ogg *.oga *.mp3 *.mp4 *.aac *.flac *.mid *.wv *.ape *.spx);;All files (*.*)</source>
<translation> (*.wav *.opus *.ogg *.oga *.mp3 *.mp4 *.aac *.flac *.mid *.wv *.ape *.spx);; (*.*)</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="1913"/>
<location filename="../src/ui/articleview.cc" line="1914"/>
<source>Failed to play sound file: %1</source>
<translation>%1</translation>
</message>
@ -813,11 +813,21 @@ between classic and school orthography in cyrillic)</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/dictinfo.cc" line="30"/>
<location filename="../src/ui/dictinfo.cc" line="31"/>
<source>Edit the dictionary via command:
%1</source>
<translation>%1</translation>
</message>
<message>
<location filename="../src/ui/dictinfo.ui"/>
<source>Index filename:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/dictinfo.ui"/>
<source>Open index folder</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>DictListModel</name>
@ -1457,12 +1467,12 @@ between classic and school orthography in cyrillic)</source>
<translation> GoldenDict-ng</translation>
</message>
<message>
<location filename="../src/initializing.cc" line="19"/>
<location filename="../src/initializing.cc" line="18"/>
<source>Please wait...</source>
<translation>...</translation>
</message>
<message>
<location filename="../src/initializing.cc" line="28"/>
<location filename="../src/initializing.cc" line="27"/>
<source>Indexing...</source>
<translation type="unfinished"></translation>
</message>
@ -2727,17 +2737,17 @@ between classic and school orthography in cyrillic)</source>
<translation>F4</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="1529"/>
<location filename="../src/ui/mainwindow.cc" line="1560"/>
<source>All</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="200"/>
<location filename="../src/ui/mainwindow.cc" line="224"/>
<source>Back</source>
<translation>退</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="1502"/>
<location filename="../src/ui/mainwindow.cc" line="1533"/>
<source>%1 dictionaries, %2 articles, %3 words</source>
<translation>%1%2%3</translation>
</message>
@ -2763,12 +2773,12 @@ between classic and school orthography in cyrillic)</source>
</message>
<message>
<location filename="../src/ui/mainwindow.ui"/>
<location filename="../src/ui/mainwindow.cc" line="383"/>
<location filename="../src/ui/mainwindow.cc" line="407"/>
<source>&amp;Quit</source>
<translation>退(&amp;Q)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3279"/>
<location filename="../src/ui/mainwindow.cc" line="3305"/>
<source>Error</source>
<translation></translation>
</message>
@ -2783,12 +2793,12 @@ between classic and school orthography in cyrillic)</source>
<translation>(&amp;C)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3279"/>
<location filename="../src/ui/mainwindow.cc" line="3305"/>
<source>Can&apos;t save article: %1</source>
<translation>%1</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="246"/>
<location filename="../src/ui/mainwindow.cc" line="270"/>
<source>Zoom In</source>
<translation></translation>
</message>
@ -2818,7 +2828,7 @@ between classic and school orthography in cyrillic)</source>
<translation>(&amp;S)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3262"/>
<location filename="../src/ui/mainwindow.cc" line="3288"/>
<source>Save Article As</source>
<translation></translation>
</message>
@ -2848,17 +2858,17 @@ between classic and school orthography in cyrillic)</source>
<translation>(&amp;H)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="2961"/>
<location filename="../src/ui/mainwindow.cc" line="2987"/>
<source>New Release Available</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="250"/>
<location filename="../src/ui/mainwindow.cc" line="274"/>
<source>Zoom Out</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="376"/>
<location filename="../src/ui/mainwindow.cc" line="400"/>
<source>Show &amp;Main Window</source>
<translation>(&amp;M)</translation>
</message>
@ -2868,27 +2878,27 @@ between classic and school orthography in cyrillic)</source>
<translation> GoldenDict-ng</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="2968"/>
<location filename="../src/ui/mainwindow.cc" line="2994"/>
<source>Download</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3157"/>
<location filename="../src/ui/mainwindow.cc" line="3183"/>
<source>Page Setup</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="254"/>
<location filename="../src/ui/mainwindow.cc" line="278"/>
<source>Normal Size</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="2811"/>
<location filename="../src/ui/mainwindow.cc" line="2837"/>
<source>Failed to initialize hotkeys monitoring mechanism.&lt;br&gt;Make sure your XServer has RECORD extension turned on.</source>
<translation>&lt;br&gt; XServer RECORD </translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="2962"/>
<location filename="../src/ui/mainwindow.cc" line="2988"/>
<source>Version &lt;b&gt;%1&lt;/b&gt; of GoldenDict is now available for download.&lt;br&gt;Click &lt;b&gt;Download&lt;/b&gt; to get to the download page.</source>
<translation> GoldenDict &lt;b&gt;%1&lt;/b&gt;&lt;br&gt;
&lt;b&gt;&lt;/b&gt;</translation>
@ -2904,12 +2914,12 @@ between classic and school orthography in cyrillic)</source>
<translation>Ctrl+F5</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="583"/>
<location filename="../src/ui/mainwindow.cc" line="607"/>
<source>Loading...</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="1688"/>
<location filename="../src/ui/mainwindow.cc" line="1719"/>
<source>(untitled)</source>
<translation></translation>
</message>
@ -2920,12 +2930,12 @@ between classic and school orthography in cyrillic)</source>
</message>
<message>
<location filename="../src/ui/mainwindow.ui"/>
<location filename="../src/ui/mainwindow.cc" line="729"/>
<location filename="../src/ui/mainwindow.cc" line="757"/>
<source>Welcome!</source>
<translation>使</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="233"/>
<location filename="../src/ui/mainwindow.cc" line="257"/>
<source>Pronounce Word (Alt+S)</source>
<translation>(Alt+S)</translation>
</message>
@ -2935,22 +2945,22 @@ between classic and school orthography in cyrillic)</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="2969"/>
<location filename="../src/ui/mainwindow.cc" line="2995"/>
<source>Skip This Release</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="202"/>
<location filename="../src/ui/mainwindow.cc" line="226"/>
<source>Forward</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3179"/>
<location filename="../src/ui/mainwindow.cc" line="3205"/>
<source>Print Article</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3158"/>
<location filename="../src/ui/mainwindow.cc" line="3184"/>
<source>No printer is available. Please install one first.</source>
<translation></translation>
</message>
@ -2975,42 +2985,42 @@ between classic and school orthography in cyrillic)</source>
<translation>(&amp;Z)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="364"/>
<location filename="../src/ui/mainwindow.cc" line="388"/>
<source>Words Zoom In</source>
<translation> - </translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="366"/>
<location filename="../src/ui/mainwindow.cc" line="390"/>
<source>Words Zoom Out</source>
<translation> - </translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="368"/>
<location filename="../src/ui/mainwindow.cc" line="392"/>
<source>Words Normal Size</source>
<translation> - </translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="425"/>
<location filename="../src/ui/mainwindow.cc" line="449"/>
<source>Close current tab</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="433"/>
<location filename="../src/ui/mainwindow.cc" line="457"/>
<source>Close all tabs</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="440"/>
<location filename="../src/ui/mainwindow.cc" line="464"/>
<source>Close all tabs except current</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="415"/>
<location filename="../src/ui/mainwindow.cc" line="439"/>
<source>Opened tabs</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="592"/>
<location filename="../src/ui/mainwindow.cc" line="616"/>
<source>New Tab</source>
<translation></translation>
</message>
@ -3025,65 +3035,65 @@ between classic and school orthography in cyrillic)</source>
<translation>(&amp;C)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="123"/>
<location filename="../src/ui/mainwindow.cc" line="147"/>
<source>&amp;Menubar</source>
<translation>(&amp;M)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="340"/>
<location filename="../src/ui/mainwindow.cc" line="364"/>
<source>Found in Dictionaries:</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="460"/>
<location filename="../src/ui/mainwindow.cc" line="484"/>
<source>Add all tabs to Favorites</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="945"/>
<location filename="../src/ui/mainwindow.cc" line="971"/>
<source>WARNING: %1</source>
<translation type="unfinished"> %1</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="1075"/>
<location filename="../src/ui/mainwindow.cc" line="1101"/>
<source>String to search in dictionaries. The wildcards &apos;*&apos;, &apos;?&apos; and sets of symbols &apos;[...]&apos; are allowed.
To find &apos;*&apos;, &apos;?&apos;, &apos;[&apos;, &apos;]&apos; symbols use &apos;\*&apos;, &apos;\?&apos;, &apos;\[&apos;, &apos;\]&apos; respectively</source>
<translation>使*?[...]
*?[]使\*\?\[\]</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="1637"/>
<location filename="../src/ui/mainwindow.cc" line="1668"/>
<source>Open Tabs List</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="1884"/>
<location filename="../src/ui/mainwindow.cc" line="1953"/>
<location filename="../src/ui/mainwindow.cc" line="4318"/>
<location filename="../src/ui/mainwindow.cc" line="4346"/>
<location filename="../src/ui/mainwindow.cc" line="4385"/>
<location filename="../src/ui/mainwindow.cc" line="1915"/>
<location filename="../src/ui/mainwindow.cc" line="1979"/>
<location filename="../src/ui/mainwindow.cc" line="4344"/>
<location filename="../src/ui/mainwindow.cc" line="4372"/>
<location filename="../src/ui/mainwindow.cc" line="4411"/>
<source>Remove current tab from Favorites</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="1908"/>
<location filename="../src/ui/mainwindow.cc" line="1939"/>
<source>%1 - %2</source>
<translation>%1 - %2</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3063"/>
<location filename="../src/ui/mainwindow.cc" line="3089"/>
<source>You have chosen to hide a menubar. Use %1 to show it back.</source>
<translation>使 %1 </translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3065"/>
<location filename="../src/ui/mainwindow.cc" line="3091"/>
<source>Ctrl+M</source>
<translation>Ctrl+M</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.ui"/>
<location filename="../src/ui/mainwindow.cc" line="3625"/>
<location filename="../src/ui/mainwindow.cc" line="3635"/>
<location filename="../src/ui/mainwindow.cc" line="3651"/>
<location filename="../src/ui/mainwindow.cc" line="3661"/>
<source>&amp;Show</source>
<translation>(&amp;S)</translation>
</message>
@ -3093,37 +3103,37 @@ To find &apos;*&apos;, &apos;?&apos;, &apos;[&apos;, &apos;]&apos; symbols use &
<translation>(&amp;E)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3621"/>
<location filename="../src/ui/mainwindow.cc" line="3632"/>
<location filename="../src/ui/mainwindow.cc" line="3647"/>
<location filename="../src/ui/mainwindow.cc" line="3658"/>
<source>&amp;Hide</source>
<translation>(&amp;H)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3673"/>
<location filename="../src/ui/mainwindow.cc" line="3699"/>
<source>Export history to file</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3675"/>
<location filename="../src/ui/mainwindow.cc" line="3736"/>
<location filename="../src/ui/mainwindow.cc" line="3851"/>
<location filename="../src/ui/mainwindow.cc" line="3701"/>
<location filename="../src/ui/mainwindow.cc" line="3762"/>
<location filename="../src/ui/mainwindow.cc" line="3877"/>
<source>Text files (*.txt);;All files (*.*)</source>
<translation> (*.txt);; (*.*)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3719"/>
<location filename="../src/ui/mainwindow.cc" line="3745"/>
<source>History export complete</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3684"/>
<location filename="../src/ui/mainwindow.cc" line="3697"/>
<location filename="../src/ui/mainwindow.cc" line="3714"/>
<location filename="../src/ui/mainwindow.cc" line="3820"/>
<location filename="../src/ui/mainwindow.cc" line="3828"/>
<location filename="../src/ui/mainwindow.cc" line="3859"/>
<location filename="../src/ui/mainwindow.cc" line="3867"/>
<location filename="../src/ui/mainwindow.cc" line="3877"/>
<location filename="../src/ui/mainwindow.cc" line="3710"/>
<location filename="../src/ui/mainwindow.cc" line="3723"/>
<location filename="../src/ui/mainwindow.cc" line="3740"/>
<location filename="../src/ui/mainwindow.cc" line="3846"/>
<location filename="../src/ui/mainwindow.cc" line="3854"/>
<location filename="../src/ui/mainwindow.cc" line="3885"/>
<location filename="../src/ui/mainwindow.cc" line="3893"/>
<location filename="../src/ui/mainwindow.cc" line="3903"/>
<source>Export error: </source>
<translation></translation>
</message>
@ -3138,96 +3148,96 @@ To find &apos;*&apos;, &apos;?&apos;, &apos;[&apos;, &apos;]&apos; symbols use &
<translation>(&amp;I)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3734"/>
<location filename="../src/ui/mainwindow.cc" line="3760"/>
<source>Import history from file</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3783"/>
<location filename="../src/ui/mainwindow.cc" line="3809"/>
<source>Import error: invalid data in file</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3789"/>
<location filename="../src/ui/mainwindow.cc" line="3815"/>
<source>History import complete</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3746"/>
<location filename="../src/ui/mainwindow.cc" line="3777"/>
<location filename="../src/ui/mainwindow.cc" line="3909"/>
<location filename="../src/ui/mainwindow.cc" line="3772"/>
<location filename="../src/ui/mainwindow.cc" line="3803"/>
<location filename="../src/ui/mainwindow.cc" line="3935"/>
<source>Import error: </source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3809"/>
<location filename="../src/ui/mainwindow.cc" line="3835"/>
<source>Export Favorites to file</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3811"/>
<location filename="../src/ui/mainwindow.cc" line="3837"/>
<source>XML files (*.xml);;All files (*.*)</source>
<translation>XML (*.xml);; (*.*)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3833"/>
<location filename="../src/ui/mainwindow.cc" line="3882"/>
<location filename="../src/ui/mainwindow.cc" line="3859"/>
<location filename="../src/ui/mainwindow.cc" line="3908"/>
<source>Favorites export complete</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3849"/>
<location filename="../src/ui/mainwindow.cc" line="3875"/>
<source>Export Favorites to file as plain list</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3897"/>
<location filename="../src/ui/mainwindow.cc" line="3923"/>
<source>Import Favorites from file</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3899"/>
<location filename="../src/ui/mainwindow.cc" line="3925"/>
<source>XML files (*.xml);;Txt files (*.txt);;All files (*.*)</source>
<translation>XML文件(*.xml);;(*.txt);;(*.*)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3929"/>
<location filename="../src/ui/mainwindow.cc" line="3955"/>
<source>Favorites import complete</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3917"/>
<location filename="../src/ui/mainwindow.cc" line="3923"/>
<location filename="../src/ui/mainwindow.cc" line="3943"/>
<location filename="../src/ui/mainwindow.cc" line="3949"/>
<source>Data parsing error</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="4136"/>
<location filename="../src/ui/mainwindow.cc" line="4162"/>
<source>Dictionary info</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="4140"/>
<location filename="../src/ui/mainwindow.cc" line="4166"/>
<source>Dictionary headwords</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="4142"/>
<location filename="../src/ui/mainwindow.cc" line="4168"/>
<source>Open dictionary folder</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="4148"/>
<location filename="../src/ui/mainwindow.cc" line="4174"/>
<source>Edit dictionary</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="4293"/>
<location filename="../src/ui/mainwindow.cc" line="4319"/>
<source>Now indexing for full-text search: </source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="4331"/>
<location filename="../src/ui/mainwindow.cc" line="4357"/>
<source>Remove headword &quot;%1&quot; from Favorites?</source>
<translation>%1</translation>
</message>
@ -3278,7 +3288,7 @@ To find &apos;*&apos;, &apos;?&apos;, &apos;[&apos;, &apos;]&apos; symbols use &
</message>
<message>
<location filename="../src/ui/mainwindow.ui"/>
<location filename="../src/ui/mainwindow.cc" line="298"/>
<location filename="../src/ui/mainwindow.cc" line="322"/>
<source>Menu Button</source>
<translation></translation>
</message>
@ -3329,10 +3339,10 @@ To find &apos;*&apos;, &apos;?&apos;, &apos;[&apos;, &apos;]&apos; symbols use &
</message>
<message>
<location filename="../src/ui/mainwindow.ui"/>
<location filename="../src/ui/mainwindow.cc" line="269"/>
<location filename="../src/ui/mainwindow.cc" line="1888"/>
<location filename="../src/ui/mainwindow.cc" line="1957"/>
<location filename="../src/ui/mainwindow.cc" line="4338"/>
<location filename="../src/ui/mainwindow.cc" line="293"/>
<location filename="../src/ui/mainwindow.cc" line="1919"/>
<location filename="../src/ui/mainwindow.cc" line="1983"/>
<location filename="../src/ui/mainwindow.cc" line="4364"/>
<source>Add current tab to Favorites</source>
<translation></translation>
</message>
@ -3347,47 +3357,47 @@ To find &apos;*&apos;, &apos;?&apos;, &apos;[&apos;, &apos;]&apos; symbols use &
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="121"/>
<location filename="../src/ui/mainwindow.cc" line="145"/>
<source>Show Names in Dictionary &amp;Bar</source>
<translation>(&amp;B)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="122"/>
<location filename="../src/ui/mainwindow.cc" line="146"/>
<source>Show Small Icons in &amp;Toolbars</source>
<translation>(&amp;T)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="197"/>
<location filename="../src/ui/mainwindow.cc" line="221"/>
<source>&amp;Navigation</source>
<translation>(&amp;N)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="225"/>
<location filename="../src/ui/mainwindow.cc" line="249"/>
<source>Enable Scanning</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3257"/>
<location filename="../src/ui/mainwindow.cc" line="3283"/>
<source>Article, Complete (*.html)</source>
<translation>, (*.html)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3258"/>
<location filename="../src/ui/mainwindow.cc" line="3284"/>
<source>Article, HTML Only (*.html)</source>
<translation>, HTML (*.html)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3337"/>
<location filename="../src/ui/mainwindow.cc" line="3363"/>
<source>Saving article...</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3350"/>
<location filename="../src/ui/mainwindow.cc" line="3376"/>
<source>Save article complete</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="3398"/>
<location filename="../src/ui/mainwindow.cc" line="3424"/>
<source>The main window is set to be always on top.</source>
<translation></translation>
</message>
@ -3397,8 +3407,8 @@ To find &apos;*&apos;, &apos;?&apos;, &apos;[&apos;, &apos;]&apos; symbols use &
<translation>(&amp;H)</translation>
</message>
<message>
<location filename="../src/ui/mainwindow.cc" line="773"/>
<location filename="../src/ui/mainwindow.cc" line="852"/>
<location filename="../src/ui/mainwindow.cc" line="799"/>
<location filename="../src/ui/mainwindow.cc" line="878"/>
<source>Accessibility API is not enabled</source>
<translation>API未启用</translation>
</message>
@ -3714,7 +3724,7 @@ for all program&apos;s network requests.</source>
<translation> Ctrl</translation>
</message>
<message>
<location filename="../src/ui/preferences.cc" line="111"/>
<location filename="../src/ui/preferences.cc" line="133"/>
<source>Lingvo</source>
<translation>Lingvo</translation>
</message>
@ -3745,7 +3755,7 @@ in the pressed state when the word selection changes.</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/preferences.cc" line="560"/>
<location filename="../src/ui/preferences.cc" line="585"/>
<source>Restart the program to apply the language change.</source>
<translation></translation>
</message>
@ -3805,7 +3815,7 @@ download page.</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/preferences.cc" line="108"/>
<location filename="../src/ui/preferences.cc" line="130"/>
<source>Default</source>
<translation></translation>
</message>
@ -3815,7 +3825,7 @@ download page.</source>
<translation>(&amp;I)</translation>
</message>
<message>
<location filename="../src/ui/preferences.cc" line="559"/>
<location filename="../src/ui/preferences.cc" line="584"/>
<source>Changing Language</source>
<translation></translation>
</message>
@ -4024,16 +4034,6 @@ however, the article from the topmost dictionary is shown.</source>
<source>Automatically scroll to target article</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/preferences.ui"/>
<source>Dictionary Font: </source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/preferences.ui"/>
<source>set the fallback font family for dictionary</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/preferences.ui"/>
<source>Article Display style:</source>
@ -4348,7 +4348,7 @@ from Stardict, Babylon and GLS dictionaries</source>
<translation> Ctrl-tab 使</translation>
</message>
<message>
<location filename="../src/ui/preferences.cc" line="112"/>
<location filename="../src/ui/preferences.cc" line="134"/>
<source>Babylon</source>
<translation></translation>
</message>
@ -4413,27 +4413,27 @@ from Stardict, Babylon and GLS dictionaries</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/preferences.cc" line="109"/>
<location filename="../src/ui/preferences.cc" line="131"/>
<source>Classic</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/preferences.cc" line="110"/>
<location filename="../src/ui/preferences.cc" line="132"/>
<source>Modern</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/preferences.cc" line="113"/>
<location filename="../src/ui/preferences.cc" line="135"/>
<source>Lingoes</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/preferences.cc" line="114"/>
<location filename="../src/ui/preferences.cc" line="136"/>
<source>Lingoes-Blue</source>
<translation>-</translation>
</message>
<message>
<location filename="../src/ui/preferences.cc" line="125"/>
<location filename="../src/ui/preferences.cc" line="147"/>
<source> MB</source>
<translation> MB</translation>
</message>
@ -4447,6 +4447,41 @@ from Stardict, Babylon and GLS dictionaries</source>
<source>Enable index with positional information</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/preferences.ui"/>
<source>Standard Font</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/preferences.ui"/>
<source>Monospace Font</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/preferences.ui"/>
<source>Serif Font</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/preferences.ui"/>
<source>Sans-serif Font</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/preferences.ui"/>
<source>Appearance</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/preferences.ui"/>
<source>These fonts will be applied when the fonts specified by a dictionary are not found.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../src/ui/preferences.ui"/>
<source>Fallback Fonts</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>ProgramTypeEditor</name>
@ -4532,7 +4567,7 @@ from Stardict, Babylon and GLS dictionaries</source>
</message>
<message>
<location filename="../src/dict/aard.cc" line="511"/>
<location filename="../src/dict/slob.cc" line="799"/>
<location filename="../src/dict/slob.cc" line="800"/>
<source>Article decoding error</source>
<translation></translation>
</message>
@ -4640,22 +4675,22 @@ from Stardict, Babylon and GLS dictionaries</source>
<context>
<name>ResourceToSaveHandler</name>
<message>
<location filename="../src/ui/articleview.cc" line="2472"/>
<location filename="../src/ui/articleview.cc" line="2474"/>
<source>ERROR: %1</source>
<translation> %1</translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="2472"/>
<location filename="../src/ui/articleview.cc" line="2474"/>
<source>Resource saving error: </source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="2498"/>
<location filename="../src/ui/articleview.cc" line="2500"/>
<source>The referenced resource failed to download.</source>
<translation></translation>
</message>
<message>
<location filename="../src/ui/articleview.cc" line="2498"/>
<location filename="../src/ui/articleview.cc" line="2500"/>
<source>WARNING: %1</source>
<translation> %1</translation>
</message>

View file

@ -296,17 +296,17 @@ Romaji::Romaji():
Group * Class::getGroup( unsigned id )
{
for( int x = 0; x < groups.size(); x++ )
if( groups.at( x ).id == id )
return &groups[ x ];
for ( auto & group : groups )
if ( group.id == id )
return &group;
return 0;
}
Group const * Class::getGroup( unsigned id ) const
{
for( int x = 0; x < groups.size(); x++ )
if( groups.at( x ).id == id )
return &groups.at( x );
for ( const auto & group : groups )
if ( group.id == id )
return &group;
return 0;
}
@ -437,13 +437,11 @@ MutedDictionaries loadMutedDictionaries( const QDomNode & mutedDictionaries )
void saveMutedDictionaries( QDomDocument & dd, QDomElement & muted,
MutedDictionaries const & mutedDictionaries )
{
for( MutedDictionaries::const_iterator i = mutedDictionaries.begin();
i != mutedDictionaries.end(); ++i )
{
for ( const auto & mutedDictionarie : mutedDictionaries ) {
QDomElement dict = dd.createElement( "mutedDictionary" );
muted.appendChild( dict );
QDomText value = dd.createTextNode( *i );
QDomText value = dd.createTextNode( mutedDictionarie );
dict.appendChild( value );
}
}
@ -847,8 +845,10 @@ Class load()
c.preferences.alwaysOnTop = ( preferences.namedItem( "alwaysOnTop" ).toElement().text() == "1" );
c.preferences.searchInDock = ( preferences.namedItem( "searchInDock" ).toElement().text() == "1" );
if ( !preferences.namedItem( "webFontFamily" ).isNull() )
c.preferences.webFontFamily = preferences.namedItem( "webFontFamily" ).toElement().text();
if ( !preferences.namedItem( "customFonts" ).isNull() ) {
CustomFonts fonts = CustomFonts::fromElement( preferences.namedItem( "customFonts" ).toElement() );
c.preferences.customFonts = fonts;
}
if ( !preferences.namedItem( "doubleClickTranslates" ).isNull() )
c.preferences.doubleClickTranslates = ( preferences.namedItem( "doubleClickTranslates" ).toElement().text() == "1" );
@ -1195,19 +1195,18 @@ void saveGroup( Group const & data, QDomElement & group )
group.setAttributeNode( shortcut );
}
for( QVector< DictionaryRef >::const_iterator j = data.dictionaries.begin(); j != data.dictionaries.end(); ++j )
{
for ( const auto & dictionarie : data.dictionaries ) {
QDomElement dictionary = dd.createElement( "dictionary" );
group.appendChild( dictionary );
QDomText value = dd.createTextNode( j->id );
QDomText value = dd.createTextNode( dictionarie.id );
dictionary.appendChild( value );
QDomAttr name = dd.createAttribute( "name" );
name.setValue( j->name );
name.setValue( dictionarie.name );
dictionary.setAttributeNode( name );
}
@ -1215,23 +1214,19 @@ void saveGroup( Group const & data, QDomElement & group )
QDomElement muted = dd.createElement( "mutedDictionaries" );
group.appendChild( muted );
for( MutedDictionaries::const_iterator i = data.mutedDictionaries.begin();
i != data.mutedDictionaries.end(); ++i )
{
for ( const auto & mutedDictionarie : data.mutedDictionaries ) {
QDomElement dict = dd.createElement( "mutedDictionary" );
muted.appendChild( dict );
QDomText value = dd.createTextNode( *i );
QDomText value = dd.createTextNode( mutedDictionarie );
dict.appendChild( value );
}
for( MutedDictionaries::const_iterator i = data.popupMutedDictionaries.begin();
i != data.popupMutedDictionaries.end(); ++i )
{
for ( const auto & popupMutedDictionarie : data.popupMutedDictionaries ) {
QDomElement dict = dd.createElement( "popupMutedDictionary" );
muted.appendChild( dict );
QDomText value = dd.createTextNode( *i );
QDomText value = dd.createTextNode( popupMutedDictionarie );
dict.appendChild( value );
}
}
@ -1254,16 +1249,15 @@ void save( Class const & c )
QDomElement paths = dd.createElement( "paths" );
root.appendChild( paths );
for( Paths::const_iterator i = c.paths.begin(); i != c.paths.end(); ++i )
{
for ( const auto & i : c.paths ) {
QDomElement path = dd.createElement( "path" );
paths.appendChild( path );
QDomAttr recursive = dd.createAttribute( "recursive" );
recursive.setValue( i->recursive ? "1" : "0" );
recursive.setValue( i.recursive ? "1" : "0" );
path.setAttributeNode( recursive );
QDomText value = dd.createTextNode( i->path );
QDomText value = dd.createTextNode( i.path );
path.appendChild( value );
}
@ -1273,20 +1267,19 @@ void save( Class const & c )
QDomElement soundDirs = dd.createElement( "sounddirs" );
root.appendChild( soundDirs );
for( SoundDirs::const_iterator i = c.soundDirs.begin(); i != c.soundDirs.end(); ++i )
{
for ( const auto & i : c.soundDirs ) {
QDomElement soundDir = dd.createElement( "sounddir" );
soundDirs.appendChild( soundDir );
QDomAttr name = dd.createAttribute( "name" );
name.setValue( i->name );
name.setValue( i.name );
soundDir.setAttributeNode( name );
QDomAttr icon = dd.createAttribute( "icon" );
icon.setValue( i->iconFilename );
icon.setValue( i.iconFilename );
soundDir.setAttributeNode( icon );
QDomText value = dd.createTextNode( i->path );
QDomText value = dd.createTextNode( i.path );
soundDir.appendChild( value );
}
@ -1312,12 +1305,11 @@ void save( Class const & c )
nextId.setValue( QString::number( c.groups.nextId ) );
groups.setAttributeNode( nextId );
for( Groups::const_iterator i = c.groups.begin(); i != c.groups.end(); ++i )
{
for ( const auto & i : c.groups ) {
QDomElement group = dd.createElement( "group" );
groups.appendChild( group );
saveGroup( *i, group );
saveGroup( i, group );
}
}
@ -1328,10 +1320,9 @@ void save( Class const & c )
hunspell.setAttributeNode( path );
root.appendChild( hunspell );
for( int x = 0; x < c.hunspell.enabledDictionaries.size(); ++x )
{
for ( const auto & enabledDictionarie : c.hunspell.enabledDictionaries ) {
QDomElement en = dd.createElement( "enabled" );
QDomText value = dd.createTextNode( c.hunspell.enabledDictionaries.at( x ) );
QDomText value = dd.createTextNode( enabledDictionarie );
en.appendChild( value );
hunspell.appendChild( en );
@ -1470,29 +1461,28 @@ void save( Class const & c )
QDomElement mws = dd.createElement( "mediawikis" );
root.appendChild( mws );
for( MediaWikis::const_iterator i = c.mediawikis.begin(); i != c.mediawikis.end(); ++i )
{
for ( const auto & mediawiki : c.mediawikis ) {
QDomElement mw = dd.createElement( "mediawiki" );
mws.appendChild( mw );
QDomAttr id = dd.createAttribute( "id" );
id.setValue( i->id );
id.setValue( mediawiki.id );
mw.setAttributeNode( id );
QDomAttr name = dd.createAttribute( "name" );
name.setValue( i->name );
name.setValue( mediawiki.name );
mw.setAttributeNode( name );
QDomAttr url = dd.createAttribute( "url" );
url.setValue( i->url );
url.setValue( mediawiki.url );
mw.setAttributeNode( url );
QDomAttr enabled = dd.createAttribute( "enabled" );
enabled.setValue( i->enabled ? "1" : "0" );
enabled.setValue( mediawiki.enabled ? "1" : "0" );
mw.setAttributeNode( enabled );
QDomAttr icon = dd.createAttribute( "icon" );
icon.setValue( i->icon );
icon.setValue( mediawiki.icon );
mw.setAttributeNode( icon );
}
}
@ -1501,33 +1491,32 @@ void save( Class const & c )
QDomElement wss = dd.createElement( "websites" );
root.appendChild( wss );
for( WebSites::const_iterator i = c.webSites.begin(); i != c.webSites.end(); ++i )
{
for ( const auto & webSite : c.webSites ) {
QDomElement ws = dd.createElement( "website" );
wss.appendChild( ws );
QDomAttr id = dd.createAttribute( "id" );
id.setValue( i->id );
id.setValue( webSite.id );
ws.setAttributeNode( id );
QDomAttr name = dd.createAttribute( "name" );
name.setValue( i->name );
name.setValue( webSite.name );
ws.setAttributeNode( name );
QDomAttr url = dd.createAttribute( "url" );
url.setValue( i->url );
url.setValue( webSite.url );
ws.setAttributeNode( url );
QDomAttr enabled = dd.createAttribute( "enabled" );
enabled.setValue( i->enabled ? "1" : "0" );
enabled.setValue( webSite.enabled ? "1" : "0" );
ws.setAttributeNode( enabled );
QDomAttr icon = dd.createAttribute( "icon" );
icon.setValue( i->iconFilename );
icon.setValue( webSite.iconFilename );
ws.setAttributeNode( icon );
QDomAttr inside_iframe = dd.createAttribute( "inside_iframe" );
inside_iframe.setValue( i->inside_iframe ? "1" : "0" );
inside_iframe.setValue( webSite.inside_iframe ? "1" : "0" );
ws.setAttributeNode( inside_iframe );
}
}
@ -1536,37 +1525,36 @@ void save( Class const & c )
QDomElement dss = dd.createElement( "dictservers" );
root.appendChild( dss );
for( DictServers::const_iterator i = c.dictServers.begin(); i != c.dictServers.end(); ++i )
{
for ( const auto & dictServer : c.dictServers ) {
QDomElement ds = dd.createElement( "server" );
dss.appendChild( ds );
QDomAttr id = dd.createAttribute( "id" );
id.setValue( i->id );
id.setValue( dictServer.id );
ds.setAttributeNode( id );
QDomAttr name = dd.createAttribute( "name" );
name.setValue( i->name );
name.setValue( dictServer.name );
ds.setAttributeNode( name );
QDomAttr url = dd.createAttribute( "url" );
url.setValue( i->url );
url.setValue( dictServer.url );
ds.setAttributeNode( url );
QDomAttr enabled = dd.createAttribute( "enabled" );
enabled.setValue( i->enabled ? "1" : "0" );
enabled.setValue( dictServer.enabled ? "1" : "0" );
ds.setAttributeNode( enabled );
QDomAttr databases = dd.createAttribute( "databases" );
databases.setValue( i->databases );
databases.setValue( dictServer.databases );
ds.setAttributeNode( databases );
QDomAttr strategies = dd.createAttribute( "strategies" );
strategies.setValue( i->strategies );
strategies.setValue( dictServer.strategies );
ds.setAttributeNode( strategies );
QDomAttr icon = dd.createAttribute( "icon" );
icon.setValue( i->iconFilename );
icon.setValue( dictServer.iconFilename );
ds.setAttributeNode( icon );
}
}
@ -1575,33 +1563,32 @@ void save( Class const & c )
QDomElement programs = dd.createElement( "programs" );
root.appendChild( programs );
for( Programs::const_iterator i = c.programs.begin(); i != c.programs.end(); ++i )
{
for ( const auto & program : c.programs ) {
QDomElement p = dd.createElement( "program" );
programs.appendChild( p );
QDomAttr id = dd.createAttribute( "id" );
id.setValue( i->id );
id.setValue( program.id );
p.setAttributeNode( id );
QDomAttr name = dd.createAttribute( "name" );
name.setValue( i->name );
name.setValue( program.name );
p.setAttributeNode( name );
QDomAttr commandLine = dd.createAttribute( "commandLine" );
commandLine.setValue( i->commandLine );
commandLine.setValue( program.commandLine );
p.setAttributeNode( commandLine );
QDomAttr enabled = dd.createAttribute( "enabled" );
enabled.setValue( i->enabled ? "1" : "0" );
enabled.setValue( program.enabled ? "1" : "0" );
p.setAttributeNode( enabled );
QDomAttr type = dd.createAttribute( "type" );
type.setValue( QString::number( i->type ) );
type.setValue( QString::number( program.type ) );
p.setAttributeNode( type );
QDomAttr icon = dd.createAttribute( "icon" );
icon.setValue( i->iconFilename );
icon.setValue( program.iconFilename );
p.setAttributeNode( icon );
}
}
@ -1668,9 +1655,9 @@ void save( Class const & c )
opt.appendChild( dd.createTextNode( c.preferences.interfaceLanguage ) );
preferences.appendChild( opt );
opt = dd.createElement( "webFontFamily" );
opt.appendChild( dd.createTextNode( c.preferences.webFontFamily ) );
preferences.appendChild( opt );
opt = dd.createElement( "customFonts" );
auto customFont = c.preferences.customFonts.toElement( dd );
preferences.appendChild( customFont );
opt = dd.createElement( "displayStyle" );
opt.appendChild( dd.createTextNode( c.preferences.displayStyle ) );

View file

@ -13,6 +13,7 @@
#include <QSet>
#include <QMetaType>
#include "ex.hh"
#include <QDomDocument>
#include <QLocale>
#include <optional>
@ -189,6 +190,56 @@ struct FullTextSearch
{}
};
struct CustomFonts
{
QString standard;
QString serif;
QString sansSerif;
QString monospace;
bool operator==( CustomFonts const & other ) const
{
return standard == other.standard && serif == other.serif && sansSerif == other.sansSerif
&& monospace == other.monospace;
}
bool operator!=( CustomFonts const & other ) const
{
return !operator==( other );
}
QDomElement toElement( QDomDocument dd ) const
{
QDomElement proxy = dd.createElement( "customFonts" );
QDomAttr standard_attr = dd.createAttribute( "standard" );
standard_attr.setValue( this->standard );
proxy.setAttributeNode( standard_attr );
QDomAttr serif_attr = dd.createAttribute( "serif" );
serif_attr.setValue( this->serif );
proxy.setAttributeNode( serif_attr );
QDomAttr sans_attr = dd.createAttribute( "sans-serif" );
sans_attr.setValue( this->sansSerif );
proxy.setAttributeNode( sans_attr );
QDomAttr mono_attr = dd.createAttribute( "monospace" );
mono_attr.setValue( this->monospace );
proxy.setAttributeNode( mono_attr );
return proxy;
}
static CustomFonts fromElement( QDomElement proxy )
{
CustomFonts c;
c.standard = proxy.attribute( "standard" );
c.serif = proxy.attribute( "serif" );
c.sansSerif = proxy.attribute( "sans-serif" );
c.monospace = proxy.attribute( "monospace" );
return c;
}
};
/// This class encapsulates supported backend preprocessor logic,
/// discourages duplicating backend names in code, which is error-prone.
class InternalPlayerBackend
@ -257,7 +308,7 @@ struct Preferences
{
QString interfaceLanguage; // Empty value corresponds to system default
QString displayStyle; // Empty value corresponds to the default one
QString webFontFamily; // Empty value corresponds to the default one
CustomFonts customFonts;
bool newTabsOpenAfterCurrentOne;
bool newTabsOpenInBackground;
bool hideSingleTab;

View file

@ -98,12 +98,36 @@ QString ApplicationSettingName = "GoldenDict";
void MainWindow::changeWebEngineViewFont() const
{
if ( cfg.preferences.webFontFamily.isEmpty() ) {
if ( cfg.preferences.customFonts.standard.isEmpty() ) {
QWebEngineProfile::defaultProfile()->settings()->resetFontFamily( QWebEngineSettings::StandardFont );
}
else {
QWebEngineProfile::defaultProfile()->settings()->setFontFamily( QWebEngineSettings::StandardFont,
cfg.preferences.webFontFamily );
cfg.preferences.customFonts.standard );
}
if ( cfg.preferences.customFonts.serif.isEmpty() ) {
QWebEngineProfile::defaultProfile()->settings()->resetFontFamily( QWebEngineSettings::SerifFont );
}
else {
QWebEngineProfile::defaultProfile()->settings()->setFontFamily( QWebEngineSettings::SerifFont,
cfg.preferences.customFonts.serif );
}
if ( cfg.preferences.customFonts.sansSerif.isEmpty() ) {
QWebEngineProfile::defaultProfile()->settings()->resetFontFamily( QWebEngineSettings::SansSerifFont );
}
else {
QWebEngineProfile::defaultProfile()->settings()->setFontFamily( QWebEngineSettings::SansSerifFont,
cfg.preferences.customFonts.sansSerif );
}
if ( cfg.preferences.customFonts.monospace.isEmpty() ) {
QWebEngineProfile::defaultProfile()->settings()->resetFontFamily( QWebEngineSettings::FixedFont );
}
else {
QWebEngineProfile::defaultProfile()->settings()->setFontFamily( QWebEngineSettings::FixedFont,
cfg.preferences.customFonts.monospace );
}
}

View file

@ -97,12 +97,34 @@ Preferences::Preferences( QWidget * parent, Config::Class & cfg_ ):
}
}
prevWebFontFamily = p.webFontFamily;
prevWebFontFamily = p.customFonts;
if(!p.webFontFamily.isEmpty())
ui.fontFamilies->setCurrentText( p.webFontFamily );
if ( !p.customFonts.standard.isEmpty() )
ui.font_standard->setCurrentText( p.customFonts.standard );
else {
ui.fontFamilies->setCurrentFont( QApplication::font() );
ui.font_standard->setCurrentFont(
QWebEngineProfile::defaultProfile()->settings()->fontFamily( QWebEngineSettings::StandardFont ) );
}
if ( !p.customFonts.serif.isEmpty() )
ui.font_serif->setCurrentText( p.customFonts.serif );
else {
ui.font_serif->setCurrentFont(
QWebEngineProfile::defaultProfile()->settings()->fontFamily( QWebEngineSettings::SerifFont ) );
}
if ( !p.customFonts.sansSerif.isEmpty() )
ui.font_sans->setCurrentText( p.customFonts.sansSerif );
else {
ui.font_sans->setCurrentFont(
QWebEngineProfile::defaultProfile()->settings()->fontFamily( QWebEngineSettings::SansSerifFont ) );
}
if ( !p.customFonts.monospace.isEmpty() )
ui.font_monospace->setCurrentText( p.customFonts.monospace );
else {
ui.font_monospace->setCurrentFont(
QWebEngineProfile::defaultProfile()->settings()->fontFamily( QWebEngineSettings::FixedFont ) );
}
ui.displayStyle->addItem( QIcon( ":/icons/programicon_old.png" ), tr( "Default" ), QString() );
@ -354,11 +376,13 @@ Config::Preferences Preferences::getPreferences()
ui.interfaceLanguage->itemData(
ui.interfaceLanguage->currentIndex() ).toString();
//bypass the first default
if(ui.fontFamilies->currentIndex()>0)
p.webFontFamily = ui.fontFamilies->currentText();
else
p.webFontFamily = "";
Config::CustomFonts c;
c.standard = ui.font_standard->currentText();
c.serif = ui.font_serif->currentText();
c.sansSerif = ui.font_sans->currentText();
c.monospace = ui.font_monospace->currentText();
p.customFonts = c;
p.displayStyle =
ui.displayStyle->itemData(
@ -560,19 +584,16 @@ void Preferences::on_buttonBox_accepted()
QMessageBox::information( this, tr( "Changing Language" ),
tr( "Restart the program to apply the language change." ) );
auto currentFontFamily = ui.fontFamilies->currentFont().family();
if( prevWebFontFamily != currentFontFamily )
{
//reset to default font .
if( currentFontFamily.isEmpty() )
{
QWebEngineProfile::defaultProfile()->settings()->resetFontFamily( QWebEngineSettings::StandardFont );
}
else
{
QWebEngineProfile::defaultProfile()->settings()->setFontFamily( QWebEngineSettings::StandardFont,
currentFontFamily );
}
auto c = getPreferences();
if ( c.customFonts != prevWebFontFamily ) {
QWebEngineProfile::defaultProfile()->settings()->setFontFamily( QWebEngineSettings::StandardFont,
c.customFonts.standard );
QWebEngineProfile::defaultProfile()->settings()->setFontFamily( QWebEngineSettings::SerifFont,
c.customFonts.serif );
QWebEngineProfile::defaultProfile()->settings()->setFontFamily( QWebEngineSettings::SansSerifFont,
c.customFonts.sansSerif );
QWebEngineProfile::defaultProfile()->settings()->setFontFamily( QWebEngineSettings::FixedFont,
c.customFonts.monospace );
}
}
@ -602,3 +623,4 @@ void Preferences::on_limitInputPhraseLength_toggled( bool checked )
{
ui.inputPhraseLengthLimit->setEnabled( checked );
}

View file

@ -13,7 +13,7 @@ class Preferences: public QDialog
int prevInterfaceLanguage = 0;
QString prevWebFontFamily;
Config::CustomFonts prevWebFontFamily;
Config::Class & cfg;
QAction helpAction;
@ -55,8 +55,6 @@ private slots:
void on_collapseBigArticles_toggled( bool checked );
void on_limitInputPhraseLength_toggled( bool checked );
};
#endif

View file

@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
<width>787</width>
<width>788</width>
<height>730</height>
</rect>
</property>
@ -53,229 +53,6 @@
<property name="topMargin">
<number>9</number>
</property>
<item row="1" column="0">
<widget class="QGroupBox" name="enableTrayIcon">
<property name="toolTip">
<string>When enabled, an icon appears in the system tray area which can be used
to open main window and perform other tasks.</string>
</property>
<property name="title">
<string>Enable system tray icon</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="startToTray">
<property name="toolTip">
<string>With this on, the application starts directly to system tray without showing
its main window.</string>
</property>
<property name="text">
<string>Start to system tray</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="closeToTray">
<property name="toolTip">
<string>With this on, an attempt to close main window would hide it instead of closing
the application.</string>
</property>
<property name="text">
<string>Close to system tray</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="4" column="0">
<widget class="QCheckBox" name="escKeyHidesMainWindow">
<property name="toolTip">
<string>Normally, pressing ESC key moves focus to the translation line.
With this on however, it will hide the main window.</string>
</property>
<property name="text">
<string>ESC key hides main window</string>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="autoScrollToTargetArticle">
<property name="toolTip">
<string>Normally, clicking on a link, double-clicking on a word or looking up
selection in an article loads the translation and almost immediately
scrolls to the article from the same dictionary. With this option off,
however, the article from the topmost dictionary is shown.</string>
</property>
<property name="text">
<string>Automatically scroll to target article</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item>
<widget class="QLabel" name="maxDictsInContextMenuLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Adjust this value to avoid huge context menus.</string>
</property>
<property name="text">
<string>Context menu dictionaries limit:</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="maxDictsInContextMenu">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>9999</number>
</property>
<property name="value">
<number>20</number>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_12">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Startup</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="cbAutostart">
<property name="toolTip">
<string>Automatically starts GoldenDict after operation system bootup.</string>
</property>
<property name="text">
<string>Start with system</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_6">
<property name="text">
<string>Interface language:</string>
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_21">
<property name="text">
<string>Dictionary Font: </string>
</property>
</widget>
</item>
<item row="20" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="10" column="0" colspan="2">
<layout class="QVBoxLayout" name="verticalLayout_16">
<item>
<widget class="QCheckBox" name="darkMode">
<property name="toolTip">
<string>Turn the UI to dark.</string>
</property>
<property name="text">
<string>Dark Mode</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="darkReaderMode">
<property name="toolTip">
<string>Turn the article display style to dark.</string>
</property>
<property name="text">
<string>Dark Reader Mode</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="selectBySingleClick">
<property name="toolTip">
<string>Turn this option on if you want to select words by single mouse click</string>
</property>
<property name="text">
<string>Select word by single click</string>
</property>
</widget>
</item>
<item row="6" column="0">
<widget class="QComboBox" name="interfaceLanguage">
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
<item row="8" column="0">
<widget class="QFontComboBox" name="fontFamilies">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>set the fallback font family for dictionary</string>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QCheckBox" name="doubleClickTranslates">
<property name="text">
@ -336,30 +113,380 @@ be the last ones.</string>
</layout>
</widget>
</item>
<item row="9" column="0">
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item row="4" column="0">
<widget class="QCheckBox" name="escKeyHidesMainWindow">
<property name="toolTip">
<string>Normally, pressing ESC key moves focus to the translation line.
With this on however, it will hide the main window.</string>
</property>
<property name="text">
<string>ESC key hides main window</string>
</property>
</widget>
</item>
<item row="3" column="0">
<widget class="QCheckBox" name="selectBySingleClick">
<property name="toolTip">
<string>Turn this option on if you want to select words by single mouse click</string>
</property>
<property name="text">
<string>Select word by single click</string>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QGroupBox" name="groupBox_2">
<property name="title">
<string>Startup</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2">
<item>
<widget class="QCheckBox" name="cbAutostart">
<property name="toolTip">
<string>Automatically starts GoldenDict after operation system bootup.</string>
</property>
<property name="text">
<string>Start with system</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="3" column="1">
<widget class="QCheckBox" name="autoScrollToTargetArticle">
<property name="toolTip">
<string>Normally, clicking on a link, double-clicking on a word or looking up
selection in an article loads the translation and almost immediately
scrolls to the article from the same dictionary. With this option off,
however, the article from the topmost dictionary is shown.</string>
</property>
<property name="text">
<string>Automatically scroll to target article</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QGroupBox" name="enableTrayIcon">
<property name="toolTip">
<string>When enabled, an icon appears in the system tray area which can be used
to open main window and perform other tasks.</string>
</property>
<property name="title">
<string>Enable system tray icon</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<property name="flat">
<bool>false</bool>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QVBoxLayout" name="verticalLayout">
<item>
<widget class="QCheckBox" name="startToTray">
<property name="toolTip">
<string>With this on, the application starts directly to system tray without showing
its main window.</string>
</property>
<property name="text">
<string>Start to system tray</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="closeToTray">
<property name="toolTip">
<string>With this on, an attempt to close main window would hide it instead of closing
the application.</string>
</property>
<property name="text">
<string>Close to system tray</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="16" column="0" colspan="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<layout class="QHBoxLayout" name="horizontalLayout_13">
<item>
<widget class="QLabel" name="label_9">
<widget class="QLabel" name="maxDictsInContextMenuLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Adjust this value to avoid huge context menus.</string>
</property>
<property name="text">
<string>Article Display style:</string>
<string>Context menu dictionaries limit:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="displayStyle"/>
</item>
<item>
<widget class="QLabel" name="addonStylesLabel">
<property name="text">
<string>Add-on style:</string>
<widget class="QSpinBox" name="maxDictsInContextMenu">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="maximum">
<number>9999</number>
</property>
<property name="value">
<number>20</number>
</property>
</widget>
</item>
<item>
<widget class="StylesComboBox" name="addonStyles"/>
<widget class="QLabel" name="label_12">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item row="9" column="0">
<widget class="QGroupBox" name="groupBox_5">
<property name="title">
<string>Appearance</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_16">
<item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
<widget class="QLabel" name="label_6">
<property name="text">
<string>Interface language:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="interfaceLanguage">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>153</width>
<height>0</height>
</size>
</property>
<property name="sizeAdjustPolicy">
<enum>QComboBox::AdjustToContents</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_5">
<item>
<widget class="QLabel" name="label_9">
<property name="text">
<string>Article Display style:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="displayStyle">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<item>
<widget class="QLabel" name="addonStylesLabel">
<property name="text">
<string>Add-on style:</string>
</property>
</widget>
</item>
<item>
<widget class="StylesComboBox" name="addonStyles">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>100</width>
<height>0</height>
</size>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="QCheckBox" name="darkMode">
<property name="toolTip">
<string>Turn the UI to dark.</string>
</property>
<property name="text">
<string>Dark Mode</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="darkReaderMode">
<property name="toolTip">
<string>Turn the article display style to dark.</string>
</property>
<property name="text">
<string>Dark Reader Mode</string>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</item>
<item row="9" column="1">
<widget class="QGroupBox" name="groupBox_10">
<property name="toolTip">
<string>These fonts will be applied when the fonts specified by a dictionary are not found.</string>
</property>
<property name="title">
<string>Fallback Fonts</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_17">
<item>
<widget class="QLabel" name="label_16">
<property name="text">
<string>Standard Font</string>
</property>
</widget>
</item>
<item>
<widget class="QFontComboBox" name="font_standard">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_21">
<property name="text">
<string>Serif Font</string>
</property>
</widget>
</item>
<item>
<widget class="QFontComboBox" name="font_serif">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_26">
<property name="text">
<string>Sans-serif Font</string>
</property>
</widget>
</item>
<item>
<widget class="QFontComboBox" name="font_sans">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_27">
<property name="text">
<string>Monospace Font</string>
</property>
</widget>
</item>
<item>
<widget class="QFontComboBox" name="font_monospace">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="fontFilters">
<set>QFontComboBox::MonospacedFonts</set>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="tab_popup">