Added group panel buttons tweak

This commit is contained in:
Vladyslav Hroshev
2025-04-16 13:29:57 +03:00
parent 58658ff7fc
commit 1ff3f6e17b
3 changed files with 97 additions and 0 deletions

View File

@@ -486,6 +486,21 @@
"a" : 0.07
}
},
"PANEL-BUTTON-BORDER": {
"_comment" : "Used as border in panel buttons",
"light" : {
"s" : 0,
"l" : 0,
"a" : 0.07
},
"dark" : {
"s" : 0,
"l" : 100,
"a" : 0.04
}
},
"SEPARATOR-COLOR" : {
"_comment" : "Color for separators",

View File

@@ -0,0 +1,77 @@
.panel-button {
border-radius: 0;
margin-left: 0;
margin-right: 0;
box-shadow: none;
border: 1px solid PANEL-BUTTON-BORDER !important;
border-left-width: 0 !important;
}
#panelCenter .panel-button {
border-radius: 9px;
margin-left: 3px;
margin-right: 3px;
box-shadow: none;
border: 1px solid PANEL-BUTTON-BORDER !important;
}
#panelLeft > StBin:first-child > .panel-button,
#panelRight > StBin:first-child > .panel-button {
border-radius: 9px 0 0 9px;
border: 1px solid PANEL-BUTTON-BORDER !important;
margin-left: 3px;
}
#panelLeft > StBin:last-child > .panel-button,
#panelRight > StBin:last-child > .panel-button {
border-radius: 0 9px 9px 0;
margin-right: 3px;
}
#panelLeft > StBin:first-child:last-child > .panel-button,
#panelRight > StBin:first-child:last-child > .panel-button {
border-radius: 9px;
border: 1px solid PANEL-BUTTON-BORDER !important;
margin-left: 3px;
margin-right: 3px;
}
#panelCenter .clock-display {
border: none !important;
}
/* in dash to panel leftPanel, centerPanel, rightPanel doesn't work as intended */
.dashtopanelMainPanel StBin:last-child > .panel-button {
border-radius: 0 !important;
margin-right: 0 !important;
}
.dashtopanelMainPanel StBin:first-child:last-child > .panel-button {
border-radius: 9px !important;
margin-left: 3px !important;
margin-right: 3px !important;
}
.dashtopanelMainPanel Gjs_ui_panel_QuickSettings.panel-button {
margin-right: 4px;
border-radius: 0 9px 9px 0;
}
/* use entire button area for clock */
.dashtopanelMainPanel .clock-display {
background-color: ACCENT-DISABLED-COLOR !important;
margin-left: 0;
margin-right: 0;
border: 1px solid PANEL-BUTTON-BORDER !important;
border-left-width: 0 !important;
}
.dashtopanelMainPanel .clock-display .clock {
background-color: transparent;
border: none !important;
box-shadow: none;
}
.dashtopanelMainPanel .clock-display:hover {
background-color: ACCENT-DISABLED_HOVER !important;
}

View File

@@ -10,6 +10,7 @@ def define_arguments(parser):
panel_args.add_argument('-Pnp', '--panel-no-pill', action='store_true', help='remove panel button background')
panel_args.add_argument('-Ptc', '--panel-text-color', type=str, nargs='?', help='custom panel HEX(A) text color')
panel_args.add_argument('--wider-panel', action='store_true', help='make the panel wider')
panel_args.add_argument('--panel-grouped-buttons', action='store_true', help='group panel buttons together')
def apply_tweak(args, theme, colors):
@@ -31,3 +32,7 @@ def apply_tweak(args, theme, colors):
.clock-display StIcon {\
color: rgba(" + ', '.join(map(str, ColorConverterImpl.hex_to_rgba(args.panel_text_color))) + ");\
}"
if args.panel_grouped_buttons:
with open(f"{panel_folder}/grouped-buttons.css", "r") as f:
theme += f.read()