Commit Graph

25 Commits

Author SHA1 Message Date
Mak Sim f12d8e60bc
WindowSDL: Add opacity feature (#8296)
* Update sdl2.pxi

Window.opacity feature

* Added opacity property to kivy.core.window.Window

Window.opacity feature

* Update window_sdl2.py

Window.opacity feature

* New feature: Window.opacity

Window.opacity feature

* Added Window.opacity example to kivy-examples

Window.opacity feature

* Create test for Window.opacity

* Fix opacity check 

Replace 'or' with 'and'

* Move tests to test_window_base.py

* Move tests to test_window_base.py

* Fix PEP8

* Fix PEP8 (first file)

* Fix PEP8 (second file)

* Move tests to WindowBaseTest class (#8296)

* Added error checking (#8296)

* Remove opacity range test (#8296)

* New Window.opacity test (#8296)

With @pythonic64 recommendations

* New error checking (kivy#8296)

* fix syntax (kivy#8296)

* Update __init__.py

* New Window.opacity test (kivy#8296)

* Add opacity value to log message (kivy#8296)

* Update __init__.py (#8296)

Add dispatching of opacity on the value change

* New example (#8296)

* Update __init__.py (kivy#8296)

* Update window_sdl2.py (kivy#8296)

* Update __init__.py (kivy#8296) 

I made a mistake, and now I've fixed it :)

* Update _window_sdl2.pyx (kivy#8296)

* Update window opacity tests (kivy#8296)

* Add more docs (kivy#8296)

* Fix docs 🫣 (kivy#8296)

* Update example (kivy#8296)

* Update example (kivy#8296)

* Fix typo (kivy#8296)

* Fix yet another typo (kivy#8296)
2023-10-16 21:03:31 +02:00
Filip Radović 5fb11bf400
WindowBase: Add on_drop_begin, on_droptext and on_drop_end events (#7786)
* WindowBase: Added on_drop_begin, on_droptext and on_drop_end events.

* WindowBase: Renamed on_dropfile event/method to on_drop_file.

* WindowSDL: Dispatching mouse pos with dropbegin event.

* WindowBase: Updated docs for on_drop_xxx events.

* WindowBase: Removed code from on_drop_file method.

* WindowBase: Updated docs for on_drop_begin and on_drop_end events.

* WindowSDL: Updated _mouse_(x|y) attributes on dropbegin event.

* SDL2: Change return type from Uint8 to Uint32 for mouse state functions to match their signature from SDL_mouse.h.

* WindowSDL: Update mouse_pos value and dispatch of on_cursor_enter event.

* WindowBase: Use same type for mouse_pos (tuple) and _density (float) properties.

* WindowBase: Passing window relative mouse pos in on_drop_begin event and skip mousewheel if the cursor pos is not within the window size.
2022-02-07 01:34:47 -05:00
Vibhakar Solanki d526ade135
Added Custom titlebar support (#7637)
* added SDL_SetWindowHitTest function definitions, and data types
* Added custom_titlebar, custom_titlebar_handler_callback to handle titlebar and resize logic
* added custom_titlebar function
* removed SDL_WINDOWEVENT_HIT_TEST from WindowEventID
* made SDL_HITTEST_DRAGGABLE conditional
* added custom_titlebar in graphics section
* added custom_titlebar as WindowBase propetry
* added custom_titlebar in setup_window
* added custom_titlebar to setup_screen and post init set_border_state
* changed default_language_version to python3
* Implemented Window specific API to Support Aero Snapping
* when custom_title, set borderless state according to platform
* Added conditionl calling of in_drag_function; check for propretry draggable
* Set borderless state depending on platform
* add condition to compile windows specific code on windows only
* group windows code together
* fix resize issue after first drag of window (on windows platform)
* Made use of class _WindowsSysDPIWatch to set WM_NCCALCSIZE
* added variable WM_NCCALCSIZE
* moved the winproc hook code to window_sdl.py
* added handling when custom_titlebar is false on windows
* set_custom_titlebar returns True on 0
* added example for set_custom_titlebar
* changed checking conditions in set_custom_titlebar
* added custom_titlebar_border; bump up config version
* fixed Win32 patform test
* check for resizeable when using custom_titlebar

closes #5279
2021-09-28 22:00:36 +02:00
Mathieu Virbel fdb0c41d58 add missing end of line 2019-02-01 20:51:08 +01:00
Mathieu Virbel 9be612399e Save a core Image into BytesIO 2019-02-01 20:21:09 +01:00
Peter Badida 8e412b87a2 PEP8 fix 2018-08-20 18:19:39 +02:00
Gabriel Pettier fa045f5aee replace nbsp with space 2018-08-20 18:19:39 +02:00
Gabriel Pettier dfbb57abad add an example for using UrlRequest 2018-08-20 18:19:39 +02:00
DefaultUser 4de0599a89 Update joystick example 2018-05-21 19:16:29 +02:00
Adachinski 87897c489d Add on_textedit event to SDL2 Window (#5597)
* Add on_textrdit event

* Add on_textedit event

* Add TextEdit Event

* Add on_textedit sample
2018-05-08 20:59:18 +02:00
Peter Badida 2d16674ce9 PEP8 fixes 2017-07-01 09:20:59 +02:00
Peter Badida b1ff3c73ef Add support for shaped windows
SDL2 only
2017-07-01 08:53:49 +02:00
Peter Badida a755e21a2e Fix shapecollisions example for py2 2017-05-13 00:37:38 +02:00
Peter Badida 52360248c2 Add shape collision example (#5079)
* Add shape collision example

* Switch to Point

* Caching values for length

* Cache Mesh, fix always True, add note, clean

* Typo
2017-04-04 00:07:32 +02:00
Peter Badida a42b60e8fb Fix clipboard example 2017-01-04 18:51:18 +01:00
Peter Badida 3191a2729f Merge pull request #4884 from bhaveshAn/correction
setting minimum_height to height in clipboard.py
2017-01-04 15:57:52 +01:00
bhaveshAn e3a9030c30 setting minimum_height to height in clipboard.py 2017-01-04 20:05:42 +05:30
Peter Badida 3a2a86ce71 Add joystick example (#4862)
* Add joystick example

* pep8 fix
2017-01-03 21:42:17 +02:00
Saqib Azim 5913d861f4 Fix for pep8 errors (#4815)
* Fix pep8 errors

* Fix pep8 errors

* Fixing pep8 errors

* fixing pep8 errors

* E731 pep8 fixes resolved for some files

* fix for E741 and E305 for some files

* pep8 fixes
2016-12-17 09:50:52 +02:00
Peter Badida 11d3d69065 Merge pull request #4513 from KeyWeeUsr/dropfile_example
Add an example for multiple Window.on_dropfile
2016-09-02 23:24:28 +02:00
Peter Badida 915b4fec2d Add an example for multiple Window.on_dropfile 2016-09-02 23:20:27 +02:00
Peter Badida e75412a567 Add clipboard example
...and fix ugly import in docs
2016-08-30 23:07:14 +02:00
Alexander Taylor 5e02b6fa52 Fixed comment syntax 2015-01-26 15:17:23 +00:00
Alexander Taylor e7fe9dbcd5 Update two_panes.py 2015-01-26 15:05:55 +00:00
Alexander Taylor df853271c3 Added miscellaneous examples folder + first entry 2015-01-23 22:44:45 +00:00