Commit Graph

577 Commits

Author SHA1 Message Date
Mike Skec 22c4fb946f BrowserTab.cpp: basic search engine functionality added 2021-02-15 10:48:07 +01:00
Mike Skec beb30b66d5 BrowserTab: fix build errors on Qt < 5.13 2021-02-14 14:18:12 +01:00
Mike Skec cce2c1a91b BrowserTab: Update regex source link to correct one 2021-02-14 14:18:12 +01:00
Mike Skec fd190163fe BrowserTab: finding quotations now works for all characters
Since #150, when typographer quotes were enabled, searching for text with quotation marks using the searchbox was made slightly more difficult as the search pattern would not match each of the different quotation mark types. This patch addresses this by using a regex which contains the search query, and creates a pattern that matches the various quote types.
2021-02-14 14:18:12 +01:00
Mike Skec 49e78d5338 renderhelpers: move global funcs to namespace 2021-02-13 12:32:26 +01:00
Mike Skec aeaa90c126 Margins are now split into seperate horizontal/vertical options 2021-02-13 12:32:26 +01:00
Mike Skec 19ac435035 Adds per-style pref for text width 2021-02-13 12:32:26 +01:00
Mike Skec 496ea48de4 Adds maximum line width functionality
Hard-coded values for now. This works by setting the left/right margins of the page dynamically (e.g on window resize). The margins are calculated to limit the text's width between a value. If the window width is less than this text width, the text fill width is the same width as the page, the margins in this case will be the user's configured margins (not yet implemented).
2021-02-13 12:32:26 +01:00
Mike Skec d5953785df GeminiRenderer: fix typographer quote bug 2021-02-13 12:31:49 +01:00
Mike Skec 6c1a611ffd add pref for typographer quotes
Also includes a fix for single-quotes on words like "'till"
2021-02-13 12:31:49 +01:00
Mike Skec 698abdb9da Adds typographer's quotes replacement 2021-02-13 12:31:49 +01:00
Mike Skec 3b06429751 Add preferences for new gemini formatting options 2021-02-10 10:06:15 +01:00
Mike Skec b1e25a64de geminirenderer: readibility improvements
Values are hard-coded at the moment. Need preferences
2021-02-10 10:06:15 +01:00
Mike Skec 08e2184c9f searchbox: fix moving to top/bottom of page during search
When searching for something that wasn't in the page, the cursor would be moved to the top or bottom of the page (depending on search direction). This fixes that by only moving the page if the search term is actually in the current buffer.
2021-02-09 10:18:41 +01:00
Mike Skec 0843ee2dad Search box: better reimplementation
This was necessary to fix a bug, where the URL bar becomes unusable while search box is visible.
2021-02-09 10:18:41 +01:00
Mike Skec 70c71e7a0e #144: small search improvements 2021-02-09 10:18:41 +01:00
J87 98a31a557f Fix typo
Co-authored-by: Michael Skec <skec@protonmail.ch>
2021-02-08 23:03:33 +01:00
J87 9643222957 Update BUILDING.md 2021-02-08 23:03:33 +01:00
Mike Skec 8fa16dccfd Add 'open in default browser' option on HTTP links 2021-02-08 08:53:25 +01:00
Michael Skec da23779d29 Add embedded icon for win32 2021-02-07 23:50:49 +01:00
Xavier Del Campo Romero a6aecaaa63 Use PageUp/Down to switch between tabs 2021-01-27 20:48:25 +01:00
Mike Skec 17a90d8dde new-tab button: add preference 2021-01-21 13:49:54 +01:00
Mike Skec 2091b038ef Added '+' button to tab bar 2021-01-21 13:49:54 +01:00
Karol Kosek ef592c4184 GopherClient: suppress remote socket closure error
Removes 'unhandled network error: QAbstractSocket::RemoteHostClosedError'
from logs. Mostly copy-pasted from GeminiClient::socketError. :^)
2021-01-21 09:42:45 +01:00
Karol Kosek b8365a5031 ElideLabel: assign variable in initialization list 2021-01-20 21:08:38 +01:00
Karol Kosek 5ebe0f91cc MarkdownRenderer: remove redundant reinitialization 2021-01-20 21:08:38 +01:00
Karol Kosek 9828bf23b0 MarkdownRenderer: render images as links 2021-01-20 21:01:28 +01:00
Karol Kosek 926930abe8 GophermapRenderer: set default font to the icon format
This fixes the icon padding change on Ctrl+Scroll.
2021-01-20 21:01:01 +01:00
Karol Kosek ce16dd660a RenderHelpers: inline incrementations 2021-01-17 19:38:06 +01:00
Karol Kosek 6290e37959 RenderHelpers: remove duplicated setColor() call 2021-01-17 19:38:06 +01:00
Karol Kosek 7f185df588 RenderHelpers: don't insert Reset code when where is only one parameter
This caused each parameter to be reset when used color codes 30–37 and 40–47,
which resulted in displaying only background or foreground color.
2021-01-17 19:38:06 +01:00
Karol Kosek b21759953e Save ansi colors to configs 2021-01-17 19:38:06 +01:00
Karol Kosek 53f5cc3453 RenderHelpers: add strikeout
StrikeOutOff was already there, but StrikeOut was not.
2021-01-17 19:38:06 +01:00
Karol Kosek 82f423cfa7 RenderHelpers: use enum instead of magic numbers with comments 2021-01-17 19:38:06 +01:00
Karol Kosek 3eb699fe29 RenderHelpers: support setting 30-38 and 40-48 color codes 2021-01-17 19:38:06 +01:00
Karol Kosek e09e829d91 RenderHelpers: simpler colors generation
- use Qt::GlobalColor table instead of switch-case for default 16 colors
- move background or foreground check below color generation
- remove setFgColor() and setBgColor() functions since we can do it in one line.
2021-01-17 19:38:06 +01:00
Karol Kosek 57354e50c3 RenderHelpers: use correct codes for bright colors 2021-01-17 19:38:06 +01:00
Karol Kosek 400ef69b4e RenderHelpers: use const iterators 2021-01-17 19:38:06 +01:00
Karol Kosek 82d86b5eb5 Remove .bak files 2021-01-16 20:27:39 +01:00
Karol Kosek fa2df5fdee BrowserTab: fix showing an empty redirect question box
The question box was showed when the redirect has a different scheme or host,
without checking first if you want to see the it, which could lead to an empty
dialog box instead of skipping it entirely.
2021-01-16 12:46:24 +01:00
Karol Kosek 3bdbb94cb9 CacheHandler: don't remove trailing slashes from url
Partly reverts commit 50729c19eb.
2021-01-13 08:58:06 +01:00
Karol Kosek 3a5b991042 Replace history on redirect 2021-01-11 20:29:21 +01:00
Karol Kosek db0202cc36 Revert "Fixes a 'resource not found' bug"
That commit broke resolving relative urls (e.g. when you were browsing
README.md, the link that goes to BUILDING resolved to README.md/BUILDING).

This reverts commit 601887655e.
2021-01-11 20:29:21 +01:00
Mike Skec c635094a6b status bar: show request status when loading pages
status text for loading HTTP/S is only a simple 'loading webpage'. The other protocols display more information
2021-01-10 13:40:46 +01:00
Mike Skec dd3e8716b2 status bar: New file cache indicator
Mime label was also simplified so that only type/subtype are shown.
2021-01-10 13:40:46 +01:00
Mike Skec 601887655e Fixes a 'resource not found' bug
When navigating to many sites, such as gemini://rawtext.club:1965/~sloum/geminilist and not having a trailing slash at the end of the URL, local links on the page would be incorrectly generated by QUrl::resolved, which would cause links to give a 'resource not found' error if they weren't at the root path of the server. This patch fixes this by making sure that all links given to the renderers include trailing slashes.
2021-01-10 13:40:46 +01:00
Karol Kosek 9fffc1ca14 BrowserTab: add Stop/Refresh action to the menu 2021-01-08 20:02:18 +01:00
Karol Kosek eb6b6266ec BrowserTab: disable impossible move actions 2021-01-08 20:02:18 +01:00
Karol Kosek 95bf102a87 BrowserTab: hide move actions on selection 2021-01-08 20:02:18 +01:00
Karol Kosek c1ca708a87 BrowserTab: show "Copy to clipboard" action only on selection 2021-01-08 20:02:18 +01:00