Skip to content

Commit b174cc9

Browse files
committed
feat: (clickgui) neutral centered NextGen group headers, dropdown section bars, bordered Zywl swatches
NextGen group headers now use a neutral panel-header background with the accent only as a left stripe and the title centered, instead of a solid accent bar. The dropdown style draws a section bar with an accent tab behind each group header so nested settings read as a block. Zywl color previews get an outline and the rainbow swatch a little breathing room.
1 parent 5861b34 commit b174cc9

6 files changed

Lines changed: 45 additions & 17 deletions

File tree

‎nextgen-theme/src/routes/clickgui/setting/ConfigurableSetting.svelte‎

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
<div class="head" class:expanded on:contextmenu|preventDefault={toggleExpanded}>
3838
<div class="title">{$spaceSeperatedNames ? convertToSpacedString(setting.name) : setting.name}</div>
3939
{#if !hideExpandControl}
40-
<ExpandArrow bind:expanded />
40+
<div class="arrow"><ExpandArrow bind:expanded /></div>
4141
{/if}
4242
</div>
4343

@@ -61,22 +61,31 @@
6161
font-size: 12px;
6262
font-weight: 700;
6363
letter-spacing: 0.2px;
64+
text-align: center;
6465
}
6566
6667
.head {
6768
display: flex;
68-
justify-content: space-between;
69+
justify-content: center;
6970
align-items: center;
71+
position: relative;
7072
padding: 6px 9px;
71-
background-color: var(--clickgui-dropdown-trigger-background-color);
72-
border-left: solid 2px var(--clickgui-setting-group-border-color);
73+
background-color: var(--clickgui-panel-header-background-color);
74+
border-left: solid 2px var(--accent-color);
7375
border-radius: 3px;
7476
cursor: pointer;
7577
transition: ease margin-bottom .2s;
7678
7779
&.expanded {
7880
margin-bottom: 8px;
7981
}
82+
83+
.arrow {
84+
position: absolute;
85+
right: 9px;
86+
top: 50%;
87+
transform: translateY(-50%);
88+
}
8089
}
8190
8291
.nested-settings {

‎src/main/java/net/ccbluex/liquidbounce/ui/client/clickgui/style/styles/fdpdropdown/impl/SettingComponents.kt‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1527,8 +1527,19 @@ class SettingComponents(private val module: Module) : Component() {
15271527
if (setting is Configurable) {
15281528
val groupY = roundToHalf(y + (count * rectHeight)).toFloat()
15291529

1530-
val label = (if (setting.groupExpanded) "- " else "+ ") + setting.name
1531-
Fonts.InterBold_18.drawString(label, x + 6, groupY + 5, textColor.rgb)
1530+
// Section bar behind the group header so nested settings read as a clear block.
1531+
drawCustomShapeWithRadius(
1532+
x + 4, groupY + 2, width - 8, rectHeight * 0.8f - 2, 2f,
1533+
RenderUtils.applyOpacity(darkRectHover, .5f)
1534+
)
1535+
drawCustomShapeWithRadius(
1536+
x + 4, groupY + 2, 2f, rectHeight * 0.8f - 2, 1f,
1537+
if (accent) accentedColor2 else textColor
1538+
)
1539+
1540+
val arrow = if (setting.groupExpanded) "-" else "+"
1541+
Fonts.InterBold_18.drawString(arrow, x + 9, groupY + 5, textColor.rgb)
1542+
Fonts.InterBold_18.drawString(setting.name, x + 17, groupY + 5, textColor.rgb)
15321543

15331544
// Hit-box must match the 0.8-row advance, otherwise it bleeds over the first
15341545
// child row; consuming the toggle click keeps the same pass from re-entering

‎src/main/java/net/ccbluex/liquidbounce/ui/client/clickgui/style/styles/yzygui/panel/element/impl/ColorElement.kt‎

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,16 +89,24 @@ class ColorElement(
8989

9090
// Main color preview
9191
RenderUtils.drawRect(previewX1.toFloat(), previewY1.toFloat(), previewX2.toFloat(), previewY2.toFloat(), currentColor.rgb)
92+
RenderUtils.drawBorder(
93+
previewX1.toFloat(), previewY1.toFloat(), previewX2.toFloat(), previewY2.toFloat(),
94+
1f, Color(0, 0, 0, 140).rgb
95+
)
9296

9397
// Rainbow preview
94-
val rainbowPreviewX2 = previewX1 - previewSize
98+
val rainbowPreviewX2 = previewX1 - previewSize - 2
9599
val rainbowPreviewX1 = rainbowPreviewX2 - previewSize
96100
if (rainbowPreviewX1 > x + 4) {
97101
RenderUtils.drawRect(
98102
rainbowPreviewX1.toFloat(), previewY1.toFloat(),
99103
rainbowPreviewX2.toFloat(), previewY2.toFloat(),
100104
ColorUtils.rainbow(setting.opacitySliderY).rgb
101105
)
106+
RenderUtils.drawBorder(
107+
rainbowPreviewX1.toFloat(), previewY1.toFloat(), rainbowPreviewX2.toFloat(), previewY2.toFloat(),
108+
1f, Color(0, 0, 0, 140).rgb
109+
)
102110
}
103111

104112
val extraOptionsHeight = if (setting.showOptions && !setting.showPicker) {

src/main/resources/assets/minecraft/fdpclient/nextgen-clickgui/assets/index-CqIkm1hY.css renamed to src/main/resources/assets/minecraft/fdpclient/nextgen-clickgui/assets/index-D_KldqYT.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/assets/minecraft/fdpclient/nextgen-clickgui/assets/index-CafY7L3m.js renamed to src/main/resources/assets/minecraft/fdpclient/nextgen-clickgui/assets/index-d4s8gryQ.js

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎src/main/resources/assets/minecraft/fdpclient/nextgen-clickgui/index.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
color: #fff;
2323
}
2424
</style>
25-
<script type="module" crossorigin src="./assets/index-CafY7L3m.js"></script>
26-
<link rel="stylesheet" crossorigin href="./assets/index-CqIkm1hY.css">
25+
<script type="module" crossorigin src="./assets/index-d4s8gryQ.js"></script>
26+
<link rel="stylesheet" crossorigin href="./assets/index-D_KldqYT.css">
2727
</head>
2828

2929
<body>

0 commit comments

Comments
 (0)