1345 Commits

Author SHA1 Message Date
Kelson
a4194cebbf
Merge pull request #1126 from kiwix/Issue#837-remember-window-size-and-position
Window position and size is remembered
2024-06-11 08:11:28 +02:00
ShaopengLin
495e8e5db5 Window position and size is remembered
Position and size of the window is saved and restored on startup.
2024-06-07 19:05:01 -04:00
Kelson
324b1e0ab4
Merge pull request #1122 from aryanA101a/main
Fix to adapt libkiwix IPv6 related API changes
2024-06-01 15:00:13 +02:00
Aryan Arora
89c3086914 fix for breaking changes in libkiwix api 2024-06-01 14:53:10 +02:00
Kelson
79efd58e1b
Merge pull request #1116 from kiwix/Issue#904-block-non-zim-external-requests
Block External Content from Zim Web Pages
2024-06-01 14:52:39 +02:00
ShaopengLin
f8d646db40 Disables external resource fetching
Webpages blocks all requests with Url not starting with "zim://", i.e. native to the Zim file.
2024-06-01 14:47:22 +02:00
Kelson
e3745f0113
Merge pull request #1117 from kiwix/qt_6.7
Do not use removed `setHasBorderInFullScreen` with qt >= 6.0
2024-05-27 15:57:39 +02:00
Matthieu Gautier
456c58b7c8 Do not use removed setHasBorderInFullScreen with qt >= 6.0
`QWindowsWindowFunctions` class has been removed in Qt 6.

See https://doc-snapshots.qt.io/qt5-5.15/windows-issues.html vs
https://doc-snapshots.qt.io/qt6-6.2/windows-issues.html

I haven't found more specific documentation.
2024-05-23 17:11:34 +02:00
Kelson
78cfc4ce83
Merge pull request #1111 from ShaopengLin/Issue#1032-add-context-for-search-filter
Added Context for Filter Placeholder Text Translation
2024-05-22 13:31:53 +02:00
ShaopengLin
e71dd85ca0 Added Context for Missing clauses and changed text for filters
Changed the text for filters from "Filter <type>" to "Filter by <type>". Added contexts that are in en.json but not present in qqq.json.
2024-05-22 13:31:44 +02:00
Kelson
332f38141b
Merge pull request #1109 from kiwix/full_line_highlighting
Proper highlighting of library items
2024-05-22 10:41:49 +02:00
Veloman Yunkan
aa256d6e1e Text remains readable on selected library entry
Before this change a library entry having keyboard focus (selected with
tab and up/down keys) was not readable since the text was displayed in
white colour on light blue background.
2024-05-22 10:56:48 +04:00
Veloman Yunkan
b0ce8c583f Full length library entry line separator
Now the library entry line separator extends all the way to the right
(into the book open/download control column).

This is achieved by having QStyledItemDelegate::paint() execute before
ContentManagerDelegate::paintBookState() and the latter must take care
to not paint over the line separator painted by the former.
2024-05-22 10:56:48 +04:00
Veloman Yunkan
4e166398b5 Suppressed the focusable widget between the book icon and name 2024-05-22 10:56:48 +04:00
Veloman Yunkan
b91712422b ContentManagerModel accesses ContentManager directly
Indirect access from ContentManagerModel to ContentManager (via
KiwixApp) contained a race condition that could lead to a crash.

Here is the call chain:

- In KiwixApp::init() the KiwixApp::mp_manager data member is initialized
  as follows:

    mp_manager = new ContentManager(&m_library, mp_downloader);

- ContentManager's constructor creates the model and the view:

    mp_view = new ContentManagerView();
    managerModel = new ContentManagerModel(this);
    updateModel();
    auto treeView = mp_view->getView();
    treeView->setModel(managerModel);
    treeView->show();

- This starts a cascade of asynchronous events that will eventually
  result in ContentManagerModel::sort() being executed. The latter has
  to call ContentManager::sortBy() and if it does so indirectly via
  `KiwixApp::getContentManager()` before the constructor of
  ContentManager has completed (and KiwixApp::mp_manager has been
  assigned to) a crash is imminent.

This commit eliminates that issue.
2024-05-22 10:56:48 +04:00
Veloman Yunkan
83d72d3b5a Library line highlighting includes the last column
- made the download ring a little darker so that it doesn't become
  invisible when highlighted

- changed the background color of the button for the Open/Download actions
  (drawn in the last column) from white to transparent so that it
  doesn't look ugly on the highlighted line.
2024-05-22 10:56:48 +04:00
Veloman Yunkan
301efe2b7a Longer library line separator
Now the library line separator extends to below the collapse/expand
control and highlighting on mouse hover covers the latter too.
2024-05-22 10:56:48 +04:00
Veloman Yunkan
24d6ac7162 Got rid of custom painting of the book thumbnail
Now ContentManagerModel returns for 0th column an icon object that can
be painted by `QStyledItemDelegate::paint()` correctly (albeit in a
slightly less indented position).

As a side-effect of this minor improvement of the design, the thumbnail
column is included in highlighting on mouse hover.
2024-05-22 10:53:26 +04:00
Kelson
a529627449
Merge pull request #1079 from sgourdas/feature/reading_list
Library list pinning behavior
2024-05-21 18:11:55 +02:00
sgourdas
3b895c6f69 Library list pinning behavior 2024-05-21 18:11:35 +02:00
Kelson
ba6fee9d3f
Merge pull request #1110 from ShaopengLin/Issue#1100-add-preview-button
Added ContextMenu Button for Previewing Online Books
2024-05-18 21:05:52 +02:00
ShaopengLin
0c865181c8 Added ContextMenu button for Book Preview
Added action to open preview of an online book in native web browser. The option is available for books with states  Online, Downloading, and Paused.
2024-05-18 14:37:45 -04:00
ShaopengLin
3b2019bb94 Created method to generate remote library url
Refactored existing file static function makeHttpUrl to a member function that retrieves the remote library url from the request manager. Will be used for implementing the preview functionality.
2024-05-18 14:30:56 -04:00
Kelson
a394efcda8
Merge pull request #1058 from sgourdas/feature/import_settings
Import file path memorization
2024-05-12 15:05:30 +02:00
vinurk
bee0c20de5 Import file path memorization 2024-05-12 13:10:30 +03:00
Kelson
921bc729a6
Merge pull request #1060 from ShaopengLin/Issue#832-fix-book-mark
Fix #832: Seperated Bookmark Button from Search Icon
2024-05-11 13:01:41 +02:00
ShaopengLin
b49d6ec8ca Updated styles for the QToolBar
Redefined styles sheets for new widgets. Increased button svg size since QToolButton doesn't increase button size to be larger than source.
2024-05-11 13:00:50 +02:00
ShaopengLin
3c6454d8f4 Connected actions to Bookmark Button
BookmarkButton is now a QToolButton to better work with actions. Now clicks can modify menu text displays and menu displays can simulate clicks.
2024-05-11 13:00:50 +02:00
ShaopengLin
fb1d5ea25a Create Action and Shortcut for Bookmark
Created a ON-OFF action for Bookmark and added in Edit Menu Actions. Assigned shortcut Ctrl + D, which the Donation shortcut is now Ctrl + SHIFT + D. Action disabled for non-Zim tabs
2024-05-11 13:00:50 +02:00
ShaopengLin
c4c3367c78 Seperate SearchButton (now BookmarkButton)from LineEdit
Renamed SearchButton to BookmarkButton since it no longer has the search icon. Moved BookmarkButton to the right side of SearchBar
2024-05-11 13:00:50 +02:00
ShaopengLin
ea0a682af9 Seperate QLabel from SearchButton to SearchBar
Since we will be seperate search icon from bookmark button, we remove the logic in SearchButton and simply put an equivalent QLabel in SearchBar.
2024-05-11 13:00:50 +02:00
ShaopengLin
9f1c8ef497 Refactor SearchBar to QToolBar
SearchBar becomes QToolBar instead of QLineEdit. The previous LineEdit is now a child of SearchBar
2024-05-11 13:00:50 +02:00
Kelson
ee3a2be2e8
Merge pull request #1101 from kiwix/Route_de_Lausanne_107_Bourg-en-Lavaux
Fixed detection of clicks on download control buttons
2024-05-11 12:59:17 +02:00
Veloman Yunkan
390193a3a6 Fixed detection of clicks on download control buttons
Note that the button region is considered to be the bounding rectangle
of the button icon circle rather than the circle itself.
2024-05-10 17:35:43 +04:00
Veloman Yunkan
42d5e78dc0 Introduced DownloadControlLayout 2024-05-10 17:30:21 +04:00
Veloman Yunkan
ec89f87d55 Cleaner download control button drawing primitives 2024-05-10 17:30:21 +04:00
Veloman Yunkan
553568ddc8 Renamed a variable 2024-05-10 17:30:21 +04:00
Kelson
18456eb9c4
Merge pull request #1098 from kiwix/united_states_of_books
Declaration of USB (Unified States of Books)
2024-05-09 15:28:41 +02:00
Veloman Yunkan
0ecb142ca6 Rewrote handling of last column clicks using book states 2024-05-09 15:16:30 +02:00
Veloman Yunkan
b6fbfb6104 Rewrote last column display using book states 2024-05-09 15:16:30 +02:00
Veloman Yunkan
7761c6f7b3 Context menu takes error states into account 2024-05-09 15:16:30 +02:00
Veloman Yunkan
d35fc1ff06 Rewrote context menu setup using book states 2024-05-09 15:16:30 +02:00
Veloman Yunkan
7bef510731 Enter ContentManager::BookState 2024-05-09 15:16:30 +02:00
Veloman Yunkan
b7fa28b811 Better nesting & indentation 2024-05-09 15:16:30 +02:00
Veloman Yunkan
9a754715f7 In some situations, short is better than long 2024-05-09 15:16:30 +02:00
Kelson
851ccc59c0
Merge pull request #1104 from ShaopengLin/Bugfix-Qt6-QVariant-TypeId
BugFix: Compilation Failure for Qt6 Due to Deprecated Members
2024-05-07 18:10:42 +02:00
ShaopengLin
086ba67b93 Fixed compilation failure in Qt6
Replaced deprecated member type() and QVariant::Type to compatible members in both Qt5&6
2024-05-07 11:47:47 -04:00
Veloman Yunkan
904dbb40bf
Merge pull request #1097 from kiwix/Route_de_Lausanne_107_Bourg-en-Lavaux
Fixed thumbnail display for books being downloaded
2024-05-04 01:02:59 +04:00
Veloman Yunkan
e12715e6c4 Fixed thumbnail display for books being downloaded 2024-05-02 11:34:42 +02:00
Veloman Yunkan
423f3e8d02 Trivial nano-cleanup 2024-05-02 11:21:09 +02:00