Commit graph

35 commits

Author SHA1 Message Date
TheJackiMonster dc86e3b14e
Adjusted fixes for python 3.10 to not crash immediately
Signed-off-by: TheJackiMonster <thejackimonster@gmail.com>
2021-12-13 14:27:59 +01:00
Alexandre 40e6bf0793
Fix #846 close Fullscreen when exiting main editor (#854)
* Fix #846 close Fullscreen when exiting main screen

* Removing debug code and initializing _fullscreen

* Removing the print
2021-04-09 16:03:31 +02:00
Jan Wester ff2cbca028 Converted most print statements to use logging
Some snippets have yet to be converted due to the more complex nature
of those snippets, and to keep things neat a separate commit makes more
sense for those.
2021-04-08 18:44:28 +02:00
Belug 696678e25d Fix #456 - Force the distraction free window to be display on the same screen as the main window 2021-04-07 20:43:37 -04:00
TheJackiMonster 12be4c3a3d
Fixed all Python syntax warnings 2021-02-21 23:45:34 +01:00
Jan-Niklas Meier 385396c089 trying to resolve full screen exit issues on macOS 2019-05-03 09:41:39 -06:00
Youness Alaoui d0f02cb2a7 Add a Spellchecker abstraction layer and clean up code
This is in preparation for adding support for additional spellchecking libraries
other than PyEnchant which seems to be unmaintained and does not build in
Windows 64 bit.
2019-04-30 09:54:31 -06:00
Youness Alaoui 5a9c82a03a fullscreen: Rework panel 'addDisplay' API and improve top panel Path UX
The 'displays' system of panels is now changed into simply a settings system
where settings can be associated to widgets. The new API is :
addWidgetSetting, addSetting and setSettingCallback.

The top panel was reworked to have the settings appear in the order of the
widgets, and the path/title choice was changed into a Title widget with a
"Title: Show Full Path" setting.
2019-04-02 11:42:25 -06:00
Youness Alaoui 156e2d0067 fullscreen: Add a auto-show/hide progress setting.
Realizing that the show/hide progress was being ignored if we navigate to a
scene without a goal set. Also, if we go fullscreen on a scene without a goal
then navigate to a scene with one, the progress wouldn't get shown. Adding the
"Auto Show/Hide" setting fixes the issue with all use cases.
2019-04-02 11:42:25 -06:00
Youness Alaoui 8900a0ed3f fullscreen: Change navigation/new-document layout
Left-align the navigation and new-document buttons in the top panel to
prevent them from moving around when changing scenes.
2019-04-02 11:42:25 -06:00
Youness Alaoui a27a1f399a Adding navigation support to fullscreen editor
This makes the fullscreen editor much more powerful in terms of navigating
through chapters and scenes. This should make issue #234 users happy and
fix #444.

Top panel now has left/right arrows to navigate through the scenes. It will
automatically find the next/previous text item and display it, navigating through
the outline tree.

There's also a "New document" icon which will create a new text entry immediately
after the current one and switch to it.

Navigation can also be done using Alt+Page-Up, Alt+Page-Down or Alt+Left and Alt+right
shortcuts (Fixing #444).

There's now also the option between Title or Path for the top panel, if Path is chosen
then the full path of the scene is displayed and clicking on the scene or parent items
opens a menu to quickly switch to the selected chapter/scene. Selecting a folder will
automatically display the first text entry available in that folder.
2019-04-02 11:42:25 -06:00
Youness Alaoui 62b225e22c Fullscreen: Add scene title to top panel 2019-04-02 11:42:25 -06:00
Youness Alaoui 5d0fdb7a80 fullscreen: Add option to remove spellcheck button from top panel 2019-04-02 11:42:25 -06:00
Youness Alaoui 9312427e13 Add clock widget to the bottom panel and add setting for showing seconds
The bottom panel now has a clock widget, and the myPanel has a addSetting method
in order to add non-widget settings to the popup menu.
2019-04-02 11:42:25 -06:00
Youness Alaoui 58ab998ad9 Add ability to save fullscreen panel settings
This includes the auto-hide of each panel as well as the shown/hidden status
of each of the displays. Now that it's consistent, it makes it so much more useful.
2019-04-02 11:42:25 -06:00
Youness Alaoui 932550be89 fullscreen: Add 'displays' to the bottom panel that can be shown/hidden.
This is an experimental idea. We can add to a myPanel a list of widgets to show/hide
if the user wants to, via the context menu. This can be very useful for a user who
wants to disable auto-hide for the bottom panel but remove the theme selector which
can be useless to have open permanently.

This is the first step in fixing #234. Would need the auto-hide and the displays
configurations to be saved in settings though before it can become usable.
2019-04-02 11:42:25 -06:00
Youness Alaoui 7c8458b0da Fix color scheme of fullscreen editor
Color scheme was inverted if foreground was transparent, bug and fix provided
by @tildagail [1] and the text on the left side panel was ignoring text color
settings, making it unreadable in dark themes, as reported by @worstje in #527

[1] https://github.com/olivierkes/manuskript/issues/527#issuecomment-469578130
2019-03-29 10:22:55 -06:00
Youness Alaoui a6942b7923 Fix crash when right-clicking twice on fullscreen panel
If you right click once on the fullscreen panel and the context menu pop up
then you right click again somewhere else on the panel *while the previous
context menu is still visible* then it will cause a crash with :
"Windows fatal exception: access violation"
It seems to be caused by a crash in the QT event loop, trying to delete the
existing QMenu within an event handler.
2019-02-28 10:58:23 -07:00
Youness Alaoui 4a9937f041 Do not use a lambda function in the fullScreenEditor's myScrollBar timer signal
The lambda function will keep a reference to the scrollbar python object preventing it
from getting destroyed when the QScrollbar is destroyed. This causes the underlying
QT widget to be freed while the python object still exists, therefore the timer itself
doesn't get stopped/cleaned, so the timer will get called and cause a crash with :
"RuntimeError: Wrapped C/C++ object of type myScrollbar has been deleted"

To reproduce, press F11 repeatedly while scrolling.
2019-02-25 10:22:48 -07:00
Curtis Gedak baeb5f4653 2nd try to fix macOS X blank screen when leaving fullscreen editor mode
See issue #24.

The first attempt to fix this problem was with commit:

    Try to fix macOS X blank screen when leaving editor fullscreen mode
    1ae0a77464
2019-02-12 11:23:29 -07:00
Curtis Gedak 1ae0a77464 Try to fix macOS X blank screen when leaving editor fullscreen mode
Ensure showNormal() is called after leaving showFullScreen().

See issue #24.

References:

https://stackoverflow.com/questions/31666744/pyqt5-can-not-close-a-topmost-fullscreen-qdialog-on-mac-osx

https://doc.qt.io/qt-5/qwidget.html#showFullScreen
  - To return from full-screen mode, call showNormal().

https://pythonprogramminglanguage.com/destructor/
2019-02-09 10:27:44 -07:00
Sebastian Rasmussen dfe88a9681 Fix typos in code comments, invisible to end-users. 2018-01-29 10:30:41 -07:00
Olivier Keshavjee c504cb510e Fixes fullScreen scrollbar range 2017-11-28 19:58:23 +01:00
Olivier Keshavjee c2dcbf56a0 Adds new markdown highlighter and many little tweaks 2017-11-27 21:35:32 +01:00
Olivier Keshavjee 7b29d332c5 Removes textFormat panel (bold, italic, etc. buttons) 2017-11-27 20:58:02 +01:00
Olivier Keshavjee c1ad771642 Subclass textEditView 2017-11-27 15:00:07 +01:00
Olivier Keshavjee 9e95196cc5 Changes Outline enums to IntEnum 2017-11-15 20:58:12 +01:00
Olivier Keshavjee 1aa6afc2bc Fixes: One white pixel visible in full screen mode #210 2017-11-12 20:48:27 +01:00
Olivier Keshavjee c89dd460da Adds: Ability to always show word target in distraction free mode #109 2017-10-14 11:38:22 +02:00
Olivier Keshavjee f069183ac8 Fixes a small bug in when closing fullScreenEditor 2017-10-14 11:12:56 +02:00
Olivier Keshavjee 694b30a600 Fullscreen theme list uses theme's propper name 2016-03-24 14:17:26 +01:00
Olivier Keshavjee 0a70ec3d5d Corrects bug: fullscreen editor error when no text (wordcount = 0) 2016-02-28 09:00:36 +01:00
Olivier Keshavjee 9feb0776b6 Bug correction: fullscreen mode doesn't work if scene goal is not set 2016-02-10 01:28:37 +01:00
Olivier Keshavjee 69e0ca93be Cleaning up imports, at last 2016-02-06 12:34:22 +01:00
Olivier Keshavjee c469f262f3 Renaming source folder 2016-02-06 08:38:33 +01:00
Renamed from src/ui/editors/fullScreenEditor.py (Browse further)