* Android pause on back key/gesture
Replaces previous divergence between Android and Kivy state machines.
* Android exit app when on_pause returns False
Corrects previous behavior where Kivy app stops, but Android does not stop.
* stop() - set Android state
Let Kivy app state follow Android state.
* Add pause()
* typo
* Disambiguate
It is unclear it "default case" refers to existence of a return statement, or existence of a method.
* add versionadded
* pep8
* pep8
* pep8
* Update kivy/app.py
Co-authored-by: Mirko Galimberti <me@mirkogalimberti.com>
* Update app.py
Co-authored-by: Mirko Galimberti <me@mirkogalimberti.com>
* Add support for KIVY_LOG_MODE
Including:
* New unit tests
* Limiting some unit tests to some modes.
* Adding pytest markers to allow quick testing of relevant tests, without repeating unaffected tests.
* Removing KIVY_LOG_MODE=TEST which has been subsumed by PYTHON mode.
* Added an xfail test for another Issue while I am here.
* Documentation additions.
* Mention environment variable control of the logger in the config description.
* Mute Config-file driven log level changes
When in PYTHON mode, the Config file's ability to change levels should be muted.
* Fixed items identified in Review #1.
* Typo in documentation
Co-authored-by: Mirko Galimberti <me@mirkogalimberti.com>
* Suppress coverage report until end.
Co-authored-by: Mirko Galimberti <me@mirkogalimberti.com>
* Move logging handler installation code into a function.
Also, move color terminal detection into its own function to reduce local complexity.
* Move handlers to root level, instead of monkey patching.
* Add blank lines.
* Flake8 fixes
* Use kivy.utils.platform
Its algorithm is more exhaustive than a simple env var check.
LogRecords may contain non-string messages (not just non-string args) that aren't converted to strings until the last moment (to save expensive effort if the log message is never emitted).
Bug introduced with Colored/UncoloredLogRecords did not convert to str before replacing colour markings (if any).
str() added.
Unit tests added (used to fail, now pass)
* Ellipse: update param types in docs
Ellipse parameters `angle_start` and `angle_end` are now called as `float` in docs instead of `int`
* Ellipse: change default param to floats
For additional clarity, change `angle_start` and `angle_end` default values to floats (0.0, 360.0)
* Support KivyLogMode for logging testing
Also:
Remove unused imports.
Remove Python 2 only code
Run through Black to canonicalize formatting
* Undo formatting changes
Undo black.
Found via `codespell -q 3 -S ./doc/sources/changelog.rst -L als,ba,childrens,childs,co-ordinate,co-ordinates,datas,enew,everytime,inout,iself,quitted,tesselate,tesselated,tesselator,ths`
* Refactor ColoredFormatter
Removed old formatter and support code.
Added 3 LogRecord shims, new formatter, new unit tests for above and a unit test that used to fail to confirm bugs have been fixed.
* PEP8 fixes
Match project-style.
* PEP8 fixes
(I can't run `black` on these files without
making the review too hard.)
* PEP8 Fixes
Note to self: Do a `black` refactor of key files so I don't get stuck in this loop again.
* fix(UrlRequest): Add "on_finish" and add alternative implementation
- Added "on_finish" callback to URlRequest, it fires always when the request is done
- Added alternative implementation for UrlRequest based on REQUESTS lib
- It have also implemented "on_finish" and "auth" params for easy BASICAUTH handling
- Refactored tests of new implementation to be mocked by RESPONSES, so we dont need real network to test nor we dont ping real servers during tests
- Made selectable implementations of URLlib and Requests.
- Urllib is still default implementation
- Refactored baseclass to be used with "plugins"
* fix docs and add "implementation" in config
- There was missing docs in some places
- Minor "unused variables" fixes
- Add "implementation" key to config.network
Updates documentation:
- Adds further documentation
- More details about 'versionadded' and 'versionchanged'
Little improvement/fix (found during update of the documentation):
- Update the arrow image size information on arrow_image change.
The textinput uses a Bubble for "cut", "copy", "paste" functionality.
Three example scripts and kv files contained the Bubble widget.
Signed-off-by: AnthonyZimmermann <anthony.zimmermann@protonmail.com>
The old Bubble widget design was complicated and used a GridLayout with
multiple dummy widgets solely to get an arrow placed as desired.
Multiple magic numbers like 99 columns or 99 rows were undocumented
and unintuitive. Probably some of these numbers even add unnecessary
limitations to the Bubble widget.
The Bubble widget was fused with the 'BubbleContent' which by design
makes the Bubble widget feel very unflexible.
Sizing the Bubble according to the content was unintuitive if not even
impossible for some cases and the arrow positioning was relying on magic
numbers as well. Lastly, the old implementation lacked test coverage
with very few tests that did not even cover the core logic of the
widget.
The new implementation reduces the core logic (formerly "on_arrow_pos",
~100 lines of code) to ~30 lines plus a well documented lookup structure
without magic but intuitive values. Furthermore, it adds proper inline
documentation for maintainers.
Furthermore, completely flexible arrow positioning was implemented and
allows free positioning of the arrow to all sides of the content by
selecting a (relative) position on the Bubble widget border.
The BubbleContent widget is a seperate styled BoxLayout and the code and
documentation makes clear that any other Widet or Layout can be placed as
content. The background_color, border and border_auto_scale properties
have been attached to the BubbleContent instead of the Bubble itself
which removes the unnecessary connections between the Bubble itself and it's
BubbleContent.
Properties, that refer to multiple dimensions are cleanly integrated
through ReferenceListProperties.
The rework of the Bubble widget fixes the issue #4348 which had been
opened in 2016 and remained unsolved.
Minimal changes are necessary for existing applications using the Bubble
widget:
- A BubbleContent (can be any Layout or a single Widget) is added as only child
to the Bubble (similarly to the ActionBar/ActionView widgets).
- The background_color, border and border_auto_scale properties have
been removed from the Bubble as they belong to the BubbleContent
Signed-off-by: AnthonyZimmermann <anthony.zimmermann@protonmail.com>
* VideoPlayer: Defer before the next frame the default thumbnail and annotations loading.
* Avoid on_ usage, reset thumbnail and add some tests
* Check if annotation is not empty and added a relevant test
* Fix typo