Commit Graph

544 Commits (16382d9574ab380bfab449ab8477ac61a864465f)
 

Author SHA1 Message Date
Gonçalo Silva 16382d9574 Remove non-Python requirements from requirements.txt 2019-05-04 16:34:12 +01:00
Gonçalo Silva 250519f319 Improve gspell_view encapsulation inside TextView 2019-05-04 16:33:09 +01:00
Gonçalo Silva c2d0bde9f8 Replace set_value(X, type(Y)) with set_type(X, Y) for Settings 2019-05-04 16:33:09 +01:00
Gonçalo Silva 939edcc762 Allow disabling scroll sync 2019-05-04 16:33:09 +01:00
Gonçalo Silva db652ef84f Ensure text view is focused when toggling preview
Consistent with other menu options.
2019-05-04 16:33:09 +01:00
Gonçalo Silva a0a19ffbe7 Replace get_value(X).get_Y() with get_Y(X) for Settings 2019-05-04 16:33:09 +01:00
Gonçalo Silva c2a43c374a Remove unused class 2019-05-04 16:33:09 +01:00
Gonçalo Silva e80b61cf9d Work-around for unwanted scroll while resizing the editor
The problem: When a TextView *with vertical margins set* is resized, it
scrolls upwards automatically. It's not entirely clear why this happens,
but removing the top/bottom margins fixes the issue entirely.

The work-around: enforcing the scroll scale between a resize starting
and the UI becoming idle again. This is a hack, and the experience is
not great (the scroll is visibly unstable for a few ms), but it patches
and old bug in UberWriter.

The better solution: Figuring out how to prevent it from happening,
either by somehow ensuring the TextView does not do this, or by
approaching the layout differently where the margin is not set on the
TextView itself.
2019-05-04 16:33:09 +01:00
Gonçalo Silva 7a2e6d5d8f Fix unwanted scroll while resizing the preview 2019-05-04 16:33:09 +01:00
Gonçalo Silva 7ff1df4371 Optimize markup update on margin/indent change
Updating text tags is expensive, so avoid it unless necessary.

A place where this was felt was when pasting large text.
2019-05-04 16:33:09 +01:00
Gonçalo Silva e533bf190d Remove unused vadjustment property 2019-05-04 16:33:09 +01:00
Gonçalo Silva ebbbd73056 Disable search during full-width preview 2019-05-04 16:33:09 +01:00
Gonçalo Silva 8ae2dfcb0b Fix preview CSS 2019-05-04 16:33:09 +01:00
Gonçalo Silva 86cffc40ec Improve full-width preview workflow 2019-05-04 16:33:09 +01:00
Gonçalo Silva dc0652e3ed Improve documentation for the new preview 2019-05-04 16:33:09 +01:00
Gonçalo Silva 65e7028843 Add toggle between various preview modes
Including:
* Full-width (original)
* Half-width
* Half-height
* Windowed
2019-05-04 16:33:09 +01:00
Gonçalo Silva f72f61ae7d Fix stats' i18n 2019-05-04 16:33:09 +01:00
Gonçalo Silva 2cb161307c Improve side-by-side experience
Includes multiple improvements to scroll syncing, preview re-render,
layout separation, etc
2019-05-04 16:33:09 +01:00
Gonçalo Silva 5e770510ee Add support for side-by-side preview
Fixes #59
2019-05-04 16:33:09 +01:00
Gonçalo Silva bc23fa9b0b Make characters-per-line configurable
This is in preparation for the side-by-side preview, where the editor
needs to become more adaptable. It indirectly fixes #141, as users can
now change the desired line-length, although there is no UI setting for
it.
2019-05-04 16:33:09 +01:00
Gonçalo Silva 562cc7e200 Sync scroll between text view and web view
Scrolling is synced via scroll percentage. This works for most cases,
but breaks down on very large or complex documents. It is consistent
with the approach other editors use (eg. iA Writer), but in the future
we should explore alternatives that don't incur in edge cases.

The syncing itself is done via JavaScript. It could be argued that a
`WebExtension` is the better approach, but it is considerably more
complex for such a simple use case and it would be painful to implement
until UberWriter's build system is updated, since it requires
implementing a C extension.

Fixes #55
2019-05-04 16:33:09 +01:00
Gonçalo Silva 63b20d0f3c Match breakpoints 2019-05-04 16:33:09 +01:00
somas95 b9e2720eed
Merge pull request #159 from goncalossilva/fix.markup
Small markup fixes
2019-05-04 14:18:12 +02:00
Manuel Genovés 6c50e53c9d Merge branch 'BrainBlasted-migrate-to-gspell' 2019-05-04 14:12:42 +02:00
Manuel Genovés 249e78c746 Migrate to gspell 2019-05-04 14:11:23 +02:00
Gonçalo Silva 241ba567e4 Fix character count with horizontal rules
Pandoc's conversion to plain text converts horizontal rules to a
sequence of 72 dashes. This update ensures that subsequent dashes
are ignored when counting characters.
2019-05-01 19:04:50 +01:00
Gonçalo Silva 9238a82d4d Fix #154 2019-05-01 19:04:27 +01:00
Gonçalo Silva 3bbbdf95e1 Add .idea to gitignore 2019-05-01 16:37:57 +01:00
Manuel Genovés cd6e5a86aa linting 2019-05-01 16:57:04 +02:00
somas95 5deae402b7
Merge pull request #152 from BrainBlasted/add-dirs-to-gitignore
gitignore: Add generated folders
2019-05-01 16:50:56 +02:00
somas95 dc80c6763a
Merge pull request #158 from UberWriter/flatpak-improvements
Flatpak improvements
2019-05-01 16:50:15 +02:00
Christopher Davis e0cea3654a Migrate to gspell
gtkspellcheck is abandoned; Use gspell instead.

Closes https://github.com/UberWriter/uberwriter/issues/93
2019-04-28 23:03:10 -04:00
Christopher Davis 15c69190d8 gitignore: Add generated folders
These folders are not tracked by us and thus should be
ignored. Prevents them from accidentally being added.
2019-04-22 18:37:43 -04:00
somas95 181af445e6
Merge pull request #148 from goncalossilva/ft.styles
Minor improvements around styles
2019-04-21 21:22:38 +02:00
Gonçalo Silva 878bbdb67c Cap preview width similar to GitHub
It is presumed that this was not included in the original stylesheets
(which were heavily based on GitHub's) because it is set in JS.
2019-04-21 01:50:49 +01:00
Gonçalo Silva ddcf76df47 Set text view padding in Python instead of CSS
Otherwise scrolling calculations will be slightly offset, as the CSS
padding is added *on top* of any other margin.
2019-04-21 01:50:49 +01:00
Gonçalo Silva 81f9104d9f Split gtk and web CSS into separate directories
Helps clean up the CSS selection on the export dialog, as only Web CSS
is useful in that scenario.
2019-04-21 01:50:49 +01:00
Gonçalo Silva e87de1424e Remove hard-coding from Gtk-related CSS
It's unecessary, since Adwaita and most popular themes provide a defined
set of public colors.

For reference, see: https://github.com/GNOME/gtk/blob/master/gtk/theme/Adwaita/_colors-public.scss
2019-04-21 01:32:26 +01:00
Manuel Genovés 9bf30143d1 Merge branch 'refi64-flatpak' into flatpak-improvements 2019-04-20 18:24:36 +02:00
Manuel Genovés 3d26dc2b25 flatpak improvements 2019-04-20 18:24:21 +02:00
somas95 c2b5116a46
Merge pull request #147 from UberWriter/various-improvements
Various improvements
2019-04-20 13:34:57 +02:00
somas95 f2d00f2f0d
Merge pull request #146 from goncalossilva/ft.stats
This PR improves statistics counting, as well as adds support for more of them, fixing #63. It does so in a iA Writer inspired way, meaning:
* The stats bar displays one stat, word count by default.
* The stats bar now contains a button that [displays all stats and allows toggling between them](https://cl.ly/a0ce3fad3d72/gnome-shell-screenshot-QRNG0Z.png).
* The default stat is saved between sessions.
* All the stats are objective and deterministic. For instance, I contemplated adding GhostWriter's "Pages" estimation, but it's outright broken in my testing, and I also think we should be strict about what too include. Too many things will make it less useful. Regardless, it's trivial to extend.
* Calculations are done on a worker thread, to prevent hogging the UI and allowing future extensibility without much consideration.
2019-04-20 13:21:37 +02:00
Ryan Gonzalez 32bb70a261 Flatpak fixes (ref. #111) 2019-04-19 13:06:13 -05:00
Manuel Genovés f466171eda print correct folders 2019-04-19 14:39:06 +02:00
Manuel Genovés dc4c4d9c2c update flatpak json 2019-04-19 14:02:57 +02:00
Manuel Genovés 8e5ccfc01d preserve the /data/media folder structure 2019-04-19 14:02:39 +02:00
somas95 2b5140dada
Merge pull request #144 from goncalossilva/various-improvements
Fix opening recents popover affecting font size
2019-04-19 13:29:09 +02:00
Gonçalo Silva dccc645430 Add paragraphs stat 2019-04-19 11:26:21 +01:00
Gonçalo Silva f6c62fb459 Tooltip capitalization fix 2019-04-19 11:23:16 +01:00
Gonçalo Silva c19f57f64b Add statistics for sentences and read time, allow user to toggle default
Fixes #63
2019-04-19 11:23:16 +01:00