It started as a simple yes/no box but is now being used as an InfoBox,
ConfirmBox and a customized MessageBox (in further commits) - this
sounds better!
New version of the App Icon: Instead of the black Kiwix bird on transparent (or white)
background, this new version is a lightly-rounded square with a white to grey gradient
that serves as a background for a black Kiwix bird on top.
The main goal of this change is for the icon to be clearly visible on any background;
given OS now support dark/light and custom modes.
I looks quite similar to the iOSmacOS and the Android icons.
In addition, those are now properly resized to all the existing sizes plus a new 512 size.
A new custom Icon for ZIM files is also included and declared for all sizes.
This seems not to be in use or broken but at least the new file is there.
It's a (macOS style) blank document (corner-folded paper) with the black bird on top
with the ZIM label at the bottom
Qt does not provide css style or API for modifying icon and text spacing in QTreeView. This is a long issue in buttons as well, as Qt draws icon and texts instead of having them as widgets that can be applied styles.
In CI build, dependencies are put in the build install location rather than
in the system libs directory, hence that path must be included in the
search for shared libraries.
The problem seems to have been triggered by recent change in the
libkiwix.pc pkg-config file which resulted in the version of some
of libkiwix dependencies (recorded in libkiwix.so) being bumped up.
As a result, previous/older versions of those dependencies embedded in
the CI build docker image
(ghcr.io/kiwix/kiwix-build_ci_focal:2024-06-03) no longer matched the
requirements of libkiwix.so, whereas the up-to-date versions of those
dependencies (that are downloaded during each build procedure) were not
used because they were not in the search path.
On Windows, static libraries are using "foo.lib" naming.
On Unix, they are in the form of "libfoo.a"
On Windows, "foo.lib" can also the definition of symbols in a foo.dll.
So you can link to "foo.lib", whatever you are doing static or dynamic linking and you are good.
However, meson is always creating static library as "libfoo.a"
'to avoid a potential name clash with shared libraries which also generate import libraries with a lib suffix.' [1]
On top of that, qmake is replacing all `-lfoo` in LIBS by `foo.lib` (on Windows).
So at the end, we try to link with `foo.lib` but we have `libfoo.a`
Solution could be :
- Rename `libfoo.a` to `foo.lib`, but it would mean modify deps libraries on the FS
- Don't use LIBS and directly set QMAKE_LFLAGS but we would have to handle different command line option format
between g++/clang and msvc
- Update meson build system of each projet to explicitly set the library naming.
- Replace `-lfoo` with absolute path to static library. This is what meson is doing internally and what
we are doing here
Any `-lfoo` is replace with absolute path to static library (`libfoo.a`) if we found one.
Else, it is keep unchanged.
[1] https://mesonbuild.com/Reference-manual_functions.html#library_name_suffix
This change allows one to navigate through the choices using up and down arrow keys from keyboard
Enter/Return key can be pressed to select the current item
This change adds a new widget called KiwixChoiceBox
The design inspiration is taken from here: https://harvesthq.github.io/chosen/#multiple-select
setType() takes a string to put on the label
We can add possible choices using the setSelections() method
Splitted the views into RowNode and DescriptionNode for consistency
RowNode represents one row with thumbnail, name, data, size, etc.
DescriptionNode shows the description
created ContentManagerHeader, inherited from QHeaderView, to implement not showing the sort indicator for first column.
Changed sort indicator position to left of text
This implements a basic model for QTreeModel
Currently, it only shows 1 row with some random data.
In future commits, data from ContentManager::getBookInfos will be taken
* Fix the AppImage packaging. Now published AppImages work correctly on recent
distrubution (@mgautierfr #905)
* Improve zim file picker (@kelson42 #886)
* Do not show ServiceWorker zim file from the remote catalog (@kelson42 #887)