-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add manual help viewer based on Qt Help Framework #3047
base: main
Are you sure you want to change the base?
Conversation
5d5bada
to
c015d02
Compare
I had to install the following additional packages to resolve config errors:
It still gives me a config warning |
I can't search within the manual, the Index tab has the same content as 'Glossary' |
I'm trying to fix this. How can I make the built process recognize updated (local) manual ressources? |
What do you mean? Should I make the branch and git repo customizable? EDIT: Does it happen in Qt assistant as well? You can test via: $ sphinx-build -b qthelp source build/qthelp
$ qhelpgenerator -o build/qthelp/Mixxx.qhc build/qthelp/Mixxx.qhcp
$ assistant-qt5 -collectionFile build/qthelp/Mixxx.qhc |
Should I run those commands in the mixxx top dir? |
No, in the manual git root dir. |
Unfortunately I'm running into python 2/3 issues again. (still need python2* for apps like gimp it seems) |
Ooof, even though Python is EOL since January 1st? Anyway, replace |
I looked at the code, too. the onl, difference is that the next correctly drawn image has a sub-chapter line right preceeding. Also when browsing the built manual it seems all other images are also correct |
Maybe because it's an SVG image? |
Do the other parts work fine?
|
Tests are failing.
|
Ah, that method is probably too new, I can just remove it. |
yeah *buntu 20.04 has just Qt5.12.8 |
Alright, no I can resize the sidebar, this has tabs Contents | Index | Search How would I tell cmake about a custom manual dir/repo now? |
This builds but the help viewer shows no contents for me. There is a crash on shutdown:
|
That was the intial version. But it requires Python + installing python dependencies and it painful to maintain.
It's the complete documentation including all images and in all languages. Maybe I can bring that size down by compiling all languages into a single qthelp file, but I gotta test that. In any case the installer size will grow, but I think it's worth it. |
I'm not so concerned with the package size, but I share @daschuer's concern at needing to do a big download before compiling Mixxx by default. Perhaps it could only download the manual for the locale of the build environment by default? For our official packages of course let's ship all translations. |
I managed to bring down the filesize for all languages to ~75 MiB. That's the best I can do, and I doubt it can be reduced further without removing all images. |
If you want to test: Here's are the precompiled help files: https://transfer.sh/QdYrg/manual.zip |
I found this: pbek/QOwnNotes#1772 (comment) Could we convert the SVGs to SVG Tiny 1.2? Maybd that would fix the issue. |
This PR is marked as stale because it has been open 90 days with no activity. |
I would like to see a offline manual that certain help button can jump to. |
That would be whole new dependency. It's basically the chrome backend IIRC. I gotta check if there are any decent SVG to SVG tiny converters, that would solve all issues ;-) |
This PR is marked as stale because it has been open 90 days with no activity. |
I have no small amount of experience with QtSVG, thanks to OpenShot, so I wrote this long-winded thing all about SVG Tiny that I'll leave at the end of this comment. However... The layout issues you're seeing have nothing to do with SVG Tiny compatibility. I was able to get a figure using the original image file to lay out correctly (well, except for the fact that it doesn't properly center), just by making these adjustments to the diff --git a/source/chapters/controlling_mixxx.rst b/source/chapters/controlling_mixxx.rst
index 73cb920..b622d93 100644
--- a/source/chapters/controlling_mixxx.rst
+++ b/source/chapters/controlling_mixxx.rst
@@ -47,15 +47,22 @@ can perform actions by pointing and clicking with your mouse.
Using a Keyboard
================
+.. container::
+
+ ..
+
.. figure:: ../_templates/keyboard_mapping_sheet.svg
:align: center
- :width: 100%
+ :width: 782
+ :height: 240
:figwidth: 100%
:alt: Keyboard shortcuts
:figclass: pretty-figures
Mixxx Keyboard shortcuts (for en-us keyboard layout)
+.. only:: builder_html
+
:download:`Download the image <../_static/Mixxx-220-Keyboard-Mapping.png>`
Controlling Mixxx with a keyboard is handy. Unlike mouse control, the keyboard
@@ -98,6 +105,11 @@ real mixer and turntables or :term:`CDJ`.
Loading a controller mapping
----------------------------
+
+.. container::
+
+ ..
+
.. figure:: ../_static/Mixxx-200-Preferences-Controllers.png
:align: center
:width: 75% (The The explicit As you can see I had to do the same thing before the PNG figure farther down, since it was also being inlined after the last line of the preceding Still, it does work: All of these layout issues come down to one — no, two simple facts:
In fact, people have at times gone to great lengths to display QtHelp content using a decent renderer, such as QtWebEngine. As with QtSVG (see below), Qt implemented just barely enough HTML support in QTextBrowser to be able to display their very basic help formatting, then they immediately declared it "good enough" and stopped working on it. So now QTextBrowser handles HTML rendering for QtHelp, something the sphinx SVG TinySwitching gears, here's what I can tell you about SVG Tiny:
I was right and wrong about those last bits: As I said, the layout issues were nothing to do with the SVG, but the SVG is also far too complex for SVG Tiny. (It has like a dozen filters on it! For no good reason!) In addition, many of the key cap labels are multi-line/line-wrapped text, which Tiny cannot handle. Honestly the only way that image would ever display correctly in QtSVG is if all of the text is converted to paths, like the text on the original keycaps. By doing that in Inkscape, then re-exporting as Optimized SVG, I was able to finally get a decent rendering of that doc (except for the figure centering): The size of the SVG file increased from ~240K to 570K (even with optimization!), but that's the price you pay to appease QtSVG. |
This PR is marked as stale because it has been open 90 days with no activity. |
This allows reading the manual inside Mixxx instead of opening webbrowser (which requires an internet connection) or opening a PDF reader. If the help files are missing, Mixxx will fall back to open the requested manual page in a webbrowser.