Skip to content

Commit 296e00f

Browse files
committed
feat: rename 'override_titlebar_opacity' to 'titlebar_opacity_override'
1 parent d28cdbd commit 296e00f

File tree

5 files changed

+45
-26
lines changed

5 files changed

+45
-26
lines changed

src/kde_material_you_colors/apply_themes.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ def apply(config: Configs, wallpaper: WallpaperReader, dark_light):
5656
titlebar_utils.klassy_windeco_outline_color(schemes, dark_light)
5757
kwin_utils.klassy_update_decoration_color_cache()
5858
needs_kwin_reload = True
59-
if (config.read("titlebar_opacity") or config.read("titlebar_opacity_dark")) and config.read("override_titlebar_opacity"):
59+
if (
60+
config.read("titlebar_opacity") or config.read("titlebar_opacity_dark")
61+
) and config.read("titlebar_opacity_override"):
6062
titlebar_utils.titlebar_opacity(
6163
config.read("titlebar_opacity"),
6264
config.read("titlebar_opacity_dark"),

src/kde_material_you_colors/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def defaults(self):
162162
"konsole_blur": [args.konsole_blur, False, 0],
163163
"color": [args.color, None, 3],
164164
"klassy_windeco_outline": [args.klassy_windeco_outline, None, 0],
165-
"override_titlebar_opacity": [args.override_titlebar_opacity, None, 0],
165+
"titlebar_opacity_override": [args.titlebar_opacity_override, None, 0],
166166
"custom_colors_list": [args.custom_colors_list, None, 3],
167167
"darker_window_list": [args.darker_window_list, None, 3],
168168
"use_startup_delay": [args.use_startup_delay, None, 0],

src/kde_material_you_colors/data/sample_config.conf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,11 +98,11 @@ ncolor = 0
9898
# Override opacity values for titlebar
9999
# Accepted values are True or False
100100
# Default is False
101-
#override_titlebar_opacity= False
101+
#titlebar_opacity_override = False
102102

103103
# Title Bar opacity (normal and dark mode)
104104
# Requires one of the following window decorations:
105-
# Klassy https://github.com/paulmcauley/klassy
105+
# Klassy https://github.com/paulmcauley/klassy
106106
# Sierra Breeze Enhanced https://github.com/kupiqu/SierraBreezeEnhanced
107107
# Accepts an integer between 0 and 100
108108
# Default is commented (opaque)
@@ -213,4 +213,4 @@ tone_multiplier = 1
213213
# Disables the automatic color fetching and
214214
# scheduled screenshot take in screenshot mode
215215
# Default is False
216-
manual_fetch = False
216+
manual_fetch = False

src/kde_material_you_colors/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def main():
177177
)
178178

179179
parser.add_argument(
180-
"--override-titlebar-opacity",
180+
"--titlebar-opacity-override",
181181
action="store_true",
182182
help="Override opacity values for titlebar",
183183
default=None,

src/plasmoid/package/contents/ui/FullRepresentation.qml

Lines changed: 37 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -535,7 +535,7 @@ ColumnLayout {
535535
property int toolbar_opacity_dark: 100; \
536536
property bool sierra_breeze_buttons_color: false; \
537537
property bool klassy_windeco_outline: false; \
538-
property bool override_titlebar_opacity: false; \
538+
property bool titlebar_opacity_override: false; \
539539
property string darker_window_list; \
540540
property string on_change_hook; \
541541
property string gui_custom_exec_location; \
@@ -1576,6 +1576,24 @@ ColumnLayout {
15761576
}
15771577

15781578
RowLayout {
1579+
Layout.topMargin: Kirigami.Units.mediumSpacing
1580+
PlasmaComponents3.Label {
1581+
text: "Override titlebar opacity"
1582+
Layout.alignment: Qt.AlignLeft
1583+
}
1584+
1585+
PlasmaComponents3.CheckBox {
1586+
id: titleBarOpacityOverride
1587+
checked: settings.titlebar_opacity_override
1588+
1589+
onCheckedChanged: {
1590+
settings.titlebar_opacity_override = checked
1591+
}
1592+
}
1593+
}
1594+
1595+
RowLayout {
1596+
enabled: titleBarOpacityOverride.checked
15791597
PlasmaComponents3.Label {
15801598
text: "Light"
15811599
Layout.alignment: Qt.AlignLeft
@@ -1603,6 +1621,7 @@ ColumnLayout {
16031621
}
16041622

16051623
RowLayout {
1624+
enabled: titleBarOpacityOverride.checked
16061625
PlasmaComponents3.Label {
16071626
text: "Dark"
16081627
Layout.alignment: Qt.AlignLeft
@@ -1653,6 +1672,23 @@ ColumnLayout {
16531672
}
16541673
}
16551674

1675+
RowLayout {
1676+
Layout.topMargin: Kirigami.Units.mediumSpacing
1677+
PlasmaComponents3.Label {
1678+
text: "Override toolbar opacity"
1679+
Layout.alignment: Qt.AlignLeft
1680+
}
1681+
1682+
PlasmaComponents3.CheckBox {
1683+
id: toolbarOpacityOverride
1684+
checked: settings.toolbar_opacity_override
1685+
1686+
onCheckedChanged: {
1687+
settings.toolbar_opacity_override = checked
1688+
}
1689+
}
1690+
}
1691+
16561692
RowLayout {
16571693
PlasmaComponents3.Label {
16581694
text: "Light"
@@ -1742,25 +1778,6 @@ ColumnLayout {
17421778
}
17431779
}
17441780

1745-
RowLayout {
1746-
Layout.topMargin: Kirigami.Units.mediumSpacing
1747-
PlasmaComponents3.Label {
1748-
text: "Override titlebar opacity"
1749-
Layout.alignment: Qt.AlignLeft
1750-
}
1751-
1752-
PlasmaComponents3.CheckBox {
1753-
id: enableOpacityOverride
1754-
checked: settings.override_titlebar_opacity
1755-
1756-
onCheckedChanged: {
1757-
settings.override_titlebar_opacity = checked
1758-
}
1759-
}
1760-
}
1761-
1762-
1763-
17641781
RowLayout {
17651782
PlasmaComponents3.Label {
17661783
text: "Match Titlebar"

0 commit comments

Comments
 (0)