Skip to content

Commit

Permalink
Merge pull request #10 from Satanarious/TFsV2.0+
Browse files Browse the repository at this point in the history
TFsV2.0 Support
  • Loading branch information
Satanarious authored Aug 29, 2023
2 parents ee7e1e5 + 1fb813c commit f0e32a2
Show file tree
Hide file tree
Showing 16 changed files with 2,725 additions and 167 deletions.
19 changes: 19 additions & 0 deletions Data/defaults.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class Key:
focusing: str = "Focusing"
hot: str = "Hot"
separator: str = "Separator"
tooltip: str = "Tooltip"
effectType: str = "Effect Type"
cornerType: str = "Corner Type"
enableDropShadow: str = "Enable Drop Shadow"
Expand All @@ -27,6 +28,9 @@ class Key:
enableImmersiveStyle: str = "Enable Immersive Style"
enableCustomRendering: str = "Enable Custom Rendering"
enableFluentAnimation: str = "Enable Fluent Animation"
noModernAppBackgroundColor: str = "No Modern App Background Color"
colorTreatAsTransparent: str = "Color Treat As Transparent"
colorTreatAsTransparentThreshold: str = "Color Treat As Transparent Threshold"
fadeOutTime: str = "Fade Out Time"
popInTime: str = "Pop In Time"
fadeInTime: str = "Fade In Time"
Expand Down Expand Up @@ -71,6 +75,9 @@ class Menu:
enableImmersiveStyle: int = rawDefaults[Key.menu][Key.enableImmersiveStyle]
enableCustomRendering: int = rawDefaults[Key.menu][Key.enableCustomRendering]
enableFluentAnimation: int = rawDefaults[Key.menu][Key.enableFluentAnimation]
noModernAppBackgroundColor: int = rawDefaults[Key.menu][Key.noModernAppBackgroundColor]
colorTreatAsTransparent: str = rawDefaults[Key.menu][Key.colorTreatAsTransparent]
colorTreatAsTransparentThreshold: int = rawDefaults[Key.menu][Key.colorTreatAsTransparentThreshold]
effectType: int = rawDefaults[Key.menu][Key.effectType]
cornerType: int = rawDefaults[Key.menu][Key.cornerType]
enableDropShadow: int = rawDefaults[Key.menu][Key.enableDropShadow]
Expand Down Expand Up @@ -119,3 +126,15 @@ class Separator:
lightModeColor: str = rawDefaults[Key.menu][Key.separator][Key.lightModeColor]
enableThemeColorization: int = rawDefaults[Key.menu][Key.separator][Key.enableThemeColorization]
disabled: int = rawDefaults[Key.menu][Key.separator][Key.disabled]

class Tooltip:
effectType: int = rawDefaults[Key.tooltip][Key.effectType]
cornerType: int = rawDefaults[Key.tooltip][Key.cornerType]
enableDropShadow: int = rawDefaults[Key.tooltip][Key.enableDropShadow]
noBorderColor: int = rawDefaults[Key.tooltip][Key.noBorderColor]
enableThemeColorization: int = rawDefaults[Key.tooltip][Key.enableThemeColorization]
darkModeBorderColor: str = rawDefaults[Key.tooltip][Key.darkModeBorderColor]
lightModeBorderColor: str = rawDefaults[Key.tooltip][Key.lightModeBorderColor]
darkModeGradientColor: str = rawDefaults[Key.tooltip][Key.darkModeGradientColor]
lightModeGradientColor: str = rawDefaults[Key.tooltip][Key.lightModeGradientColor]
disabled: int = rawDefaults[Key.tooltip][Key.disabled]
4 changes: 4 additions & 0 deletions Data/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ class EnableFluentAnimation(IntEnum):
No = 0
Yes = 1

class NoModernAppBackgroundColor(IntEnum):
No = 0
Yes = 1

class EnableCustomRendering(IntEnum):
No = 0
Yes = 1
Expand Down
5 changes: 5 additions & 0 deletions Data/paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ class RegPaths:
DisabledHot: str = r"DisabledHot\\"
Focusing: str = r"Focusing\\"
Separator: str = r"Separator\\"
Tooltip: str = r"Tooltip\\"

class RegKeys:
BaseKey: int = HKEY_CURRENT_USER
Expand All @@ -29,6 +30,7 @@ class RegKeys:
DisabledHot: str = "DisabledHot"
Focusing: str = "Focusing"
Separator: str = "Separator"
Tooltip: str = "Tooltip"
EffectType: str = "EffectType"
EnableDropShadow: str = "EnableDropShadow"
DarkModeBorderColor: str = "DarkMode_BorderColor"
Expand All @@ -42,6 +44,9 @@ class RegKeys:
EnableImmersiveStyle: str = "EnableImmersiveStyle"
EnableCustomRendering: str = "EnableCustomRendering"
EnableFluentAnimation: str = "EnableFluentAnimation"
NoModernAppBackgroundColor: str = "NoModernAppBackgroundColor"
ColorTreatAsTransparent: str = "ColorTreatAsTransparent"
ColorTreatAsTransparentThreshold: str = "ColorTreatAsTransparentThreshold"
FadeOutTime: str = "FadeOutTime"
PopInTime: str = "PopInTime"
FadeInTime: str = "FadeInTime"
Expand Down
11 changes: 3 additions & 8 deletions Data/stylesheet.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,9 @@ def frame():
return "QWidget#scrollAreaWidgetContents{background-color:white;}"

@staticmethod
def buttonColorStylesheet(rgba: tuple | str) -> str:
if type(rgba) == str:
return "QPushButton{background-color:" + rgba + ";width:20px}"
elif type(rgba) == tuple:
colorString: str = f"rgb({rgba[0]},{rgba[1]},{rgba[2]})"
return "QPushButton{background-color:" + colorString + ";width:20px}"
else:
return ""
def buttonColorStylesheet(rgba: tuple) -> str:
colorString: str = f"rgb({rgba[0]},{rgba[1]},{rgba[2]})"
return "QPushButton{background-color:" + colorString + ";width:20px}"

@staticmethod
def buttoResetStyleSheet() -> str:
Expand Down
Loading

0 comments on commit f0e32a2

Please sign in to comment.