Skip to content

Commit

Permalink
Forced color types
Browse files Browse the repository at this point in the history
  • Loading branch information
ceccopierangiolieugenio committed Nov 22, 2024
1 parent 5ceea8d commit 5edd40d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions TermTk/TTkCore/color.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def hsl2rgb(hsl):
return r,g,b

def getHex(self, ctype):
if ctype == TTkK.Foreground:
if ctype == TTkK.ColorType.Foreground:
r,g,b = self.fgToRGB()
else:
r,g,b = self.bgToRGB()
Expand Down Expand Up @@ -292,7 +292,7 @@ def blinking(self) -> bool:
def colorType(self):
return (
super().colorType() |
( TTkK.Modifier if self._mod else TTkK.NONE ))
( TTkK.ColorType.Modifier if self._mod else TTkK.NONE ))

def __str__(self):
if not self._buffer:
Expand Down
3 changes: 0 additions & 3 deletions TermTk/TTkCore/constant.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ class ColorType(int):
'''The :py:class:`TTkColor` include an hyperlink'''
ColorModifier = 0x08
'''The :py:class:`TTkColor` include a color modifier based on :py:class:`TTkColorModifier`'''
Foreground = ColorType.Foreground
Background = ColorType.Background
Modifier = ColorType.Modifier

class FocusPolicy(int):
'''
Expand Down

0 comments on commit 5edd40d

Please sign in to comment.