Skip to content

Commit f0e32a2

Browse files
authored
Merge pull request #10 from Satanarious/TFsV2.0+
TFsV2.0 Support
2 parents ee7e1e5 + 1fb813c commit f0e32a2

16 files changed

Lines changed: 2725 additions & 167 deletions

Data/defaults.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class Key:
1414
focusing: str = "Focusing"
1515
hot: str = "Hot"
1616
separator: str = "Separator"
17+
tooltip: str = "Tooltip"
1718
effectType: str = "Effect Type"
1819
cornerType: str = "Corner Type"
1920
enableDropShadow: str = "Enable Drop Shadow"
@@ -27,6 +28,9 @@ class Key:
2728
enableImmersiveStyle: str = "Enable Immersive Style"
2829
enableCustomRendering: str = "Enable Custom Rendering"
2930
enableFluentAnimation: str = "Enable Fluent Animation"
31+
noModernAppBackgroundColor: str = "No Modern App Background Color"
32+
colorTreatAsTransparent: str = "Color Treat As Transparent"
33+
colorTreatAsTransparentThreshold: str = "Color Treat As Transparent Threshold"
3034
fadeOutTime: str = "Fade Out Time"
3135
popInTime: str = "Pop In Time"
3236
fadeInTime: str = "Fade In Time"
@@ -71,6 +75,9 @@ class Menu:
7175
enableImmersiveStyle: int = rawDefaults[Key.menu][Key.enableImmersiveStyle]
7276
enableCustomRendering: int = rawDefaults[Key.menu][Key.enableCustomRendering]
7377
enableFluentAnimation: int = rawDefaults[Key.menu][Key.enableFluentAnimation]
78+
noModernAppBackgroundColor: int = rawDefaults[Key.menu][Key.noModernAppBackgroundColor]
79+
colorTreatAsTransparent: str = rawDefaults[Key.menu][Key.colorTreatAsTransparent]
80+
colorTreatAsTransparentThreshold: int = rawDefaults[Key.menu][Key.colorTreatAsTransparentThreshold]
7481
effectType: int = rawDefaults[Key.menu][Key.effectType]
7582
cornerType: int = rawDefaults[Key.menu][Key.cornerType]
7683
enableDropShadow: int = rawDefaults[Key.menu][Key.enableDropShadow]
@@ -119,3 +126,15 @@ class Separator:
119126
lightModeColor: str = rawDefaults[Key.menu][Key.separator][Key.lightModeColor]
120127
enableThemeColorization: int = rawDefaults[Key.menu][Key.separator][Key.enableThemeColorization]
121128
disabled: int = rawDefaults[Key.menu][Key.separator][Key.disabled]
129+
130+
class Tooltip:
131+
effectType: int = rawDefaults[Key.tooltip][Key.effectType]
132+
cornerType: int = rawDefaults[Key.tooltip][Key.cornerType]
133+
enableDropShadow: int = rawDefaults[Key.tooltip][Key.enableDropShadow]
134+
noBorderColor: int = rawDefaults[Key.tooltip][Key.noBorderColor]
135+
enableThemeColorization: int = rawDefaults[Key.tooltip][Key.enableThemeColorization]
136+
darkModeBorderColor: str = rawDefaults[Key.tooltip][Key.darkModeBorderColor]
137+
lightModeBorderColor: str = rawDefaults[Key.tooltip][Key.lightModeBorderColor]
138+
darkModeGradientColor: str = rawDefaults[Key.tooltip][Key.darkModeGradientColor]
139+
lightModeGradientColor: str = rawDefaults[Key.tooltip][Key.lightModeGradientColor]
140+
disabled: int = rawDefaults[Key.tooltip][Key.disabled]

Data/enums.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,10 @@ class EnableFluentAnimation(IntEnum):
4141
No = 0
4242
Yes = 1
4343

44+
class NoModernAppBackgroundColor(IntEnum):
45+
No = 0
46+
Yes = 1
47+
4448
class EnableCustomRendering(IntEnum):
4549
No = 0
4650
Yes = 1

Data/paths.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ class RegPaths:
1818
DisabledHot: str = r"DisabledHot\\"
1919
Focusing: str = r"Focusing\\"
2020
Separator: str = r"Separator\\"
21+
Tooltip: str = r"Tooltip\\"
2122

2223
class RegKeys:
2324
BaseKey: int = HKEY_CURRENT_USER
@@ -29,6 +30,7 @@ class RegKeys:
2930
DisabledHot: str = "DisabledHot"
3031
Focusing: str = "Focusing"
3132
Separator: str = "Separator"
33+
Tooltip: str = "Tooltip"
3234
EffectType: str = "EffectType"
3335
EnableDropShadow: str = "EnableDropShadow"
3436
DarkModeBorderColor: str = "DarkMode_BorderColor"
@@ -42,6 +44,9 @@ class RegKeys:
4244
EnableImmersiveStyle: str = "EnableImmersiveStyle"
4345
EnableCustomRendering: str = "EnableCustomRendering"
4446
EnableFluentAnimation: str = "EnableFluentAnimation"
47+
NoModernAppBackgroundColor: str = "NoModernAppBackgroundColor"
48+
ColorTreatAsTransparent: str = "ColorTreatAsTransparent"
49+
ColorTreatAsTransparentThreshold: str = "ColorTreatAsTransparentThreshold"
4550
FadeOutTime: str = "FadeOutTime"
4651
PopInTime: str = "PopInTime"
4752
FadeInTime: str = "FadeInTime"

Data/stylesheet.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,9 @@ def frame():
1818
return "QWidget#scrollAreaWidgetContents{background-color:white;}"
1919

2020
@staticmethod
21-
def buttonColorStylesheet(rgba: tuple | str) -> str:
22-
if type(rgba) == str:
23-
return "QPushButton{background-color:" + rgba + ";width:20px}"
24-
elif type(rgba) == tuple:
25-
colorString: str = f"rgb({rgba[0]},{rgba[1]},{rgba[2]})"
26-
return "QPushButton{background-color:" + colorString + ";width:20px}"
27-
else:
28-
return ""
21+
def buttonColorStylesheet(rgba: tuple) -> str:
22+
colorString: str = f"rgb({rgba[0]},{rgba[1]},{rgba[2]})"
23+
return "QPushButton{background-color:" + colorString + ";width:20px}"
2924

3025
@staticmethod
3126
def buttoResetStyleSheet() -> str:

0 commit comments

Comments
 (0)