SwiftGUI 0.2.2__tar.gz → 0.3.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. {swiftgui-0.2.2 → swiftgui-0.3.0}/PKG-INFO +1 -1
  2. {swiftgui-0.2.2 → swiftgui-0.3.0}/pyproject.toml +1 -1
  3. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Base.py +12 -4
  4. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Colors.py +332 -332
  5. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/ElementFlags.py +1 -0
  6. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/GlobalOptions.py +47 -13
  7. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/KeyFunctions.py +26 -0
  8. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Literals.py +2 -0
  9. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Widgets/Checkbox.py +10 -0
  10. swiftgui-0.3.0/src/SwiftGUI/Widgets/Frame.py +88 -0
  11. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Widgets/Spacer.py +8 -1
  12. swiftgui-0.3.0/src/SwiftGUI/Widgets/TKContainer.py +48 -0
  13. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Widgets/Text.py +10 -0
  14. swiftgui-0.3.0/src/SwiftGUI/Widgets/TextField.py +257 -0
  15. swiftgui-0.3.0/src/SwiftGUI/WidgetsAdvanced/ColorChooserButton.py +192 -0
  16. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/WidgetsAdvanced/FileBrowseButton.py +1 -3
  17. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Windows.py +2 -0
  18. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/__init__.py +8 -1
  19. swiftgui-0.2.2/src/SwiftGUI/Widgets/Frame.py +0 -61
  20. {swiftgui-0.2.2 → swiftgui-0.3.0}/LICENSE +0 -0
  21. {swiftgui-0.2.2 → swiftgui-0.3.0}/README.md +0 -0
  22. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Events.py +0 -0
  23. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Examples.py +0 -0
  24. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Fonts.py +0 -0
  25. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/KeyManager.py +0 -0
  26. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Popups.py +0 -0
  27. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Themes.py +0 -0
  28. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Tools.py +0 -0
  29. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Widgets/Button.py +0 -0
  30. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Widgets/Input.py +0 -0
  31. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Widgets/Listbox.py +0 -0
  32. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/Widgets/Separator.py +0 -0
  33. {swiftgui-0.2.2 → swiftgui-0.3.0}/src/SwiftGUI/WidgetsAdvanced/Form.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: SwiftGUI
3
- Version: 0.2.2
3
+ Version: 0.3.0
4
4
  Summary: An easy-to-use package for creating and using simple GUIs
5
5
  License: Apache-2.0
6
6
  Author: Eric aka LeButch
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "SwiftGUI"
3
- version = "0.2.2"
3
+ version = "0.3.0"
4
4
  packages = [
5
5
  { include = "SwiftGUI", from = "src" }
6
6
  ]
@@ -2,7 +2,7 @@ from collections.abc import Iterable, Callable
2
2
  from typing import Literal, Self, Union
3
3
  import tkinter as tk
4
4
 
5
- from SwiftGUI import Event,GlobalOptions
5
+ from SwiftGUI import Event, GlobalOptions, Color
6
6
  from SwiftGUI.ElementFlags import ElementFlag
7
7
 
8
8
 
@@ -227,7 +227,7 @@ class BaseWidget(BaseElement):
227
227
  _insert_kwargs_rows:dict # kwargs for the grid-rows
228
228
 
229
229
  #_is_container:bool = False # True, if this widget contains other widgets
230
- _contains:Iterable[Iterable[Self]] = []
230
+ _contains:Iterable[Iterable["BaseElement"]] = []
231
231
 
232
232
  _transfer_keys: dict[str:str] = dict() # Rename a key from the update-function. from -> to; from_user -> to_widget
233
233
 
@@ -376,6 +376,8 @@ class BaseWidget(BaseElement):
376
376
  if self.has_flag(ElementFlag.IS_CONTAINER):
377
377
  self._init_containing()
378
378
 
379
+ _containing_row_frame_widgets: list[tk.Frame]
380
+ _background_color: str | Color
379
381
  def _init_containing(self):
380
382
  """
381
383
  Initialize all containing widgets
@@ -387,8 +389,9 @@ class BaseWidget(BaseElement):
387
389
  # line = tk.Frame(self._tk_widget,background="orange",relief="raised",borderwidth="3",border=3)
388
390
  # actual_line = tk.Frame(line,background="lightBlue")
389
391
 
390
- line = tk.Frame(self._tk_widget,relief="flat",background="") # This is the row
391
- actual_line = tk.Frame(line,background="") # This is where the actual elements are put in
392
+ line = tk.Frame(self._tk_widget,relief="flat",background=self._background_color) # This is the row
393
+ actual_line = tk.Frame(line,background=self._background_color) # This is where the actual elements are put in
394
+ self._containing_row_frame_widgets.extend((line,actual_line))
392
395
 
393
396
  line_elem = BaseElement()
394
397
  line_elem._fake_tk_element = actual_line
@@ -457,6 +460,11 @@ class BaseWidgetContainer(BaseWidget):
457
460
  """
458
461
  Base for Widgets that contain other widgets
459
462
  """
463
+ def __init__(self,key:any=None,tk_kwargs:dict[str:any]=None,expand:bool = False,**kwargs):
464
+ super().__init__(key,tk_kwargs,expand,**kwargs)
465
+
466
+ self._containing_row_frame_widgets = list()
467
+ self._background_color: str | Color = self.defaults.single("background_color",None)
460
468
 
461
469
  def _flag_init(self):
462
470
  super()._flag_init()