--wider-panel tweak. Fixed button when clicked out of its bounds in -Pnp.

Closes #48.
This commit is contained in:
Vladyslav Hroshev
2025-03-25 18:44:19 +02:00
parent 425ef5229a
commit 11a470d176
5 changed files with 38 additions and 17 deletions

View File

@@ -165,9 +165,10 @@ Icon theme: https://github.com/vinceliuice/Colloid-icon-theme
| Option | Secondary option | Description |
|----------------------------|------------------|--------------------------------|
| -Pds, --panel_default_size | | set default panel size |
| -Pnp, --panel_no_pill | | remove panel button background |
| -Ptc, --panel_text_color | #abcdef | custom panel HEX(A) text color |
| -Pds, --panel-default-size | | set default panel size |
| -Pnp, --panel-no-pill | | remove panel button background |
| -Ptc, --panel-text-color | #abcdef | custom panel HEX(A) text color |
| --wider-panel | | make the panel a bit wider |
#### Overview tweaks

View File

@@ -6,8 +6,12 @@
}
.panel-button,
.panel-button .clock, /* Date & clock */
.clock-display StIcon { /* DND / new messages icon */
border-radius: 99px;
border: 3px solid transparent;
.panel-button .clock {
border-radius: 12px;
border: 3px solid transparent !important;
}
.panel-button { -natural-hpadding: 10px !important; }
.panel-status-indicators-box:first-child { padding-left: 0; }
.panel-status-indicators-box:last-child { padding-right: 0; }
.panel-status-indicators-box:first-child:last-child { padding: 0; }

View File

@@ -1,16 +1,18 @@
/* Remove additional background in panel buttons */
.panel-button,
.panel-button .clock, /* Date & clock */
.clock-display StIcon { /* DND / new messages icon */
.panel-button .clock {
background-color: transparent;
box-shadow: none;
margin: 0;
border: 4px solid transparent !important;
border-radius: 12px;
}
.panel-button:hover,
.panel-button:hover .clock,
.panel-button:active,
.panel-button:active .clock {
background-color: ACCENT-DISABLED_HOVER;
box-shadow: inset 0 0 0 1px BORDER-SHADOW;
background-color: transparent;
box-shadow: inset 0 0 0 999px ACCENT-DISABLED_HOVER;
}

View File

@@ -5,18 +5,23 @@ panel_folder = f"{config.tweaks_folder}/panel"
def define_arguments(parser):
panel_args = parser.add_argument_group('Panel tweaks')
panel_args.add_argument('-Pds', '--panel_default_size', action='store_true', help='set default panel size')
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('-Pds', '--panel-default-size', action='store_true', help='set default panel size')
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')
def apply_tweak(args, theme, colors):
if args.panel_no_pill:
with open(f"{panel_folder}/no-pill.css", "r") as f:
theme += f.read()
if args.panel_default_size:
with open(f"{panel_folder}/def-size.css", "r") as f:
theme += f.read()
if args.panel_no_pill:
with open(f"{panel_folder}/no-pill.css", "r") as f:
if args.wider_panel:
with open(f"{panel_folder}/wider-panel.css", "r") as f:
theme += f.read()
if args.panel_text_color:

View File

@@ -0,0 +1,9 @@
#panel {
height: 36px;
font-size: 14px;
}
.panel-button,
.panel-button .clock {
border-radius: 10px;
}