1589 Commits

Author SHA1 Message Date
ShaopengLin
b5d3ff0901 BugFix Crash Scenario When Switch Tab
Qt's WebChannel's signal JsonObject references are unreliable, so use QString for parsing. Also added guard against a potential nullptr access.
2024-11-13 16:21:59 -05:00
Kelson
0beea2d73f
Merge pull request #1229 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2024-11-13 20:26:16 +01:00
translatewiki.net
f1eb7e7ec2 Localisation updates from https://translatewiki.net. 2024-11-13 20:18:33 +01:00
Kelson
b2aa32ab78
Merge pull request #1237 from kiwix/Issue#42-toc-qtree-alternative
Introduce Table of Content Without Intense JS Invasion
2024-11-13 20:18:10 +01:00
ShaopengLin
36a2782a38 Add Tooltip to TOC
Elided item text is expanded here.
2024-11-13 20:10:17 +01:00
ShaopengLin
418f3e4562 Proper Styling to TOC 2024-11-13 20:10:17 +01:00
ShaopengLin
7311ac05af Proper Font and Sizes for TOC 2024-11-13 20:10:17 +01:00
ShaopengLin
5977cae3c5 Add Hide Button to TOC 2024-11-13 20:10:17 +01:00
ShaopengLin
b700b4e1eb Number TOC Header Entries 2024-11-13 20:10:17 +01:00
ShaopengLin
bb5f901f2a Navigate to Header On Click in TOC
Setting URL with anchor hash will act as navigation.
2024-11-13 20:10:17 +01:00
ShaopengLin
c3856cc79d Connect Sidebar to Display Table Of Content
Recursively load the header JSON.
2024-11-13 20:10:17 +01:00
ShaopengLin
befe60ba42 Signal Anchored Headers Parsed from JS
Signal emits the headers in pre-order in JSON format
2024-11-13 20:10:17 +01:00
ShaopengLin
d4bb28bb08 Ensure ReadingList&TOC display states consistent
Only one should be in checked state.
2024-11-13 20:10:17 +01:00
ShaopengLin
7d9efd5d6b Enter tableofcontentbar.{h,cpp,ui}
Re-enabled ToggleTOCAction to display the bar.
2024-11-13 20:10:17 +01:00
ShaopengLin
2b33686d40 Introduce KiwixWebChannelObject.{h, cpp}
Add channel to communicate between web page and Qt
2024-11-13 20:10:17 +01:00
ShaopengLin
02e213920c Introduce QWebEngine Javascript Infrastructure
Setup for header anchor injection
2024-11-13 20:10:17 +01:00
Kelson
b1f02ec89c
Merge pull request #1245 from kiwix/1238_better-icon
Better App Icons
2024-11-13 15:07:11 +01:00
rgaudin
6241c3c379
Adding App Icons source files 2024-11-13 11:22:17 +00:00
rgaudin
2939dc7d47
Updating App Icons
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
2024-11-13 11:02:59 +00:00
Kelson
23652495b0
Merge pull request #1218 from kiwix/Issue#413-multizim
UI for selecting the book to be used for title search
2024-11-04 10:53:57 +01:00
ShaopengLin
5922f38e75 Allow Search On Any Tab.
With MultiZim, searching on library, settings, and blank tabs are reasonable.
2024-11-04 10:16:13 +01:00
ShaopengLin
14d7cff991 Proper Elide for MultiZim List
Add Custom elide marker
2024-11-04 10:16:13 +01:00
ShaopengLin
4beac3375d Introduce getElidedText() in suggestionlistdelegate.cpp
Helper function to retrieve text content that can fit inside a length given a custom "(...)" elide.
2024-11-04 10:16:13 +01:00
ShaopengLin
37c1c38824 Proper Styling for MultiZim List 2024-11-04 10:16:13 +01:00
ShaopengLin
c5f2f766b0 Proper MultiZim List Sizing
Set height&padding for list&items and stretch to menu width.
2024-11-04 10:16:13 +01:00
ShaopengLin
85d2790b75 Check MultiZim Item When Clicking Anywhere
Previously only checks when clicking Radiobutton
2024-11-04 10:16:13 +01:00
ShaopengLin
f5bef3bf45 MultiZim Auto-Select Current Zim 2024-11-04 10:16:13 +01:00
ShaopengLin
19c7acc5f7 LineEdit Should PopupFocus
Missing this reason cause completer to do nothing
2024-11-04 10:16:13 +01:00
ShaopengLin
e489712787 Introduce ZimItemWidget to Delegate Item Display
Decouple complex item creation from button. Used later for styling.
2024-11-04 10:16:13 +01:00
ShaopengLin
e9c7421fc1 Introduce KiwixApp::OpenMultiZimAction
Shortcut and Icon for MultiZim. Since window is popup, toggle is not possible.
2024-11-04 10:16:13 +01:00
ShaopengLin
95ccd7602c Introduce MultiZim Search Button
User can search zim other than the current tab.
2024-11-04 10:16:13 +01:00
Kelson
bdfcc88425
Merge pull request #1232 from kiwix/Issue#1230-suggestion-enter-press
BugFix: Should Open Default Suggestion on Search Bar when Nothing is Selected
2024-11-04 10:15:19 +01:00
ShaopengLin
94b991ec11 Open Default Suggestion When No Selection
Search Bar opens the default suggestion when user did not select any suggestions and presses enter.
2024-10-31 12:11:40 -04:00
Kelson
d8b05aedbb
Merge pull request #1231 from kiwix/Bugfix-save-page-incorrect-cancel
BugFix: HTML Web Page incorrect behavior when canceling save page actions
2024-10-30 20:47:15 +01:00
ShaopengLin
3ebaaaa49c Move Save HTML Page to WebView::saveViewContent
Due to Qt bug, WebPage::save() cannot be cancelled by the download object in KProfile::startDownload. Mimetype checking and pdf printing moved to be processed independently.
2024-10-30 15:44:04 -04:00
ShaopengLin
901aac87c7 Introduce askForSaveFilePath in kprofile.cpp
Refactor file name retrieval.
2024-10-30 15:29:14 -04:00
ShaopengLin
018056ca22 Introduce isHTMLContent in webview.cpp
Refactor the way to determine Zim MimeType.
2024-10-30 15:29:14 -04:00
ShaopengLin
02463cc3ca Introduce getZimItem in WebView.cpp
Refactor the way to get item from url.
2024-10-30 15:29:14 -04:00
Kelson
0585c34a7e
Merge pull request #1189 from kiwix/Issue#413-search-UI-improvement
Implement Fine-Tuned Zim Search
2024-10-28 19:46:53 +01:00
ShaopengLin
c3f4a1e041 Custom Elide for Suggestion List Text
Qt painting also doesn't have elide support.
2024-10-25 12:11:13 -04:00
ShaopengLin
134be31c67 Custom Paint Suggestion Icon&Text Spacing
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.
2024-10-25 12:11:13 -04:00
ShaopengLin
32803df471 Fix Qt6 Compilation Failure.
Since Qt6, forward declaration doesn't work for QList template.
2024-10-25 12:11:13 -04:00
ShaopengLin
42bd6d6136 Proper Hover Style to Suggestion Items 2024-10-25 12:11:13 -04:00
ShaopengLin
da1faa6b24 Proper Size for Suggestion View
Header&Row evenly spread with fixed height.
2024-10-25 12:11:13 -04:00
ShaopengLin
4132cb0dde Align Search Suggestion with Line Edit 2024-10-25 12:10:43 -04:00
ShaopengLin
d80ba1f012 Consistent Left&Right Margin for SearchBar 2024-10-23 15:43:20 -04:00
ShaopengLin
de76432f7d Enter KiwixApp::getSearchBar()
Refactor to reduce getter chaining length
2024-10-23 15:43:03 -04:00
ShaopengLin
c5f4c4df88 Introduce src/css_constants.h
Effort to reduce css value dependency
2024-10-23 15:42:13 -04:00
Kelson
adfd924a28
Merge pull request #1222 from kiwix/translatewiki
Localisation updates from https://translatewiki.net.
2024-10-21 23:11:47 +02:00
translatewiki.net
f824aab850 Localisation updates from https://translatewiki.net. 2024-10-21 20:42:02 +02:00