Skip to content

Commit

Permalink
Update tkintertools
Browse files Browse the repository at this point in the history
  • Loading branch information
CodeCrafter-TL authored and CodeCrafter-TL committed Jan 22, 2025
1 parent 70c1d34 commit 1e044b4
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions maliang/core/containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,28 @@ def transparentcolor(self, value: str | None = None) -> str | None:
"""
result = self.wm_attributes("-transparentcolor", value)
return None if result == "" else result

elif platform.system() == "Darwin":

def modified(self, value: bool | None = None) -> bool | None:
"""Set or get the whether the window is modified
* `value`: indicate whether the window is modified
This method only works on macOS and OS X!
"""
result = self.wm_attributes("-modified", value)
return None if result == "" else result

Check warning on line 321 in maliang/core/containers.py

View check run for this annotation

Codecov / codecov/patch

maliang/core/containers.py#L320-L321

Added lines #L320 - L321 were not covered by tests

def transparent(self, value: bool | None = None) -> bool | None:
"""Set or get the whether the window is transparent
* `value`: indicate whether the window is transparent
This method only works on macOS and OS X!
"""
result = self.wm_attributes("-transparent", value)
return None if result == "" else result

Check warning on line 331 in maliang/core/containers.py

View check run for this annotation

Codecov / codecov/patch

maliang/core/containers.py#L330-L331

Added lines #L330 - L331 were not covered by tests

@typing_extensions.override
def destroy(self) -> None:
Expand Down

0 comments on commit 1e044b4

Please sign in to comment.