added muchroom and more

This commit is contained in:
Justin Garza
2024-12-12 21:40:59 -05:00
parent fa4d4eeaff
commit 48eb33eacf
6 changed files with 466 additions and 634 deletions
+4 -1
View File
@@ -379,7 +379,10 @@ float getWinding(vec2 a, vec2 b) { return cross(vec3(a, 0.0), vec3(b, 0.0)).z; }
// Rotates the given 2D vector a clockwise by the angle alpha (given in radians).
vec2 rotate(vec2 a, float angle) {
return vec2(a.x * cos(angle) - a.y * sin(angle), a.x * sin(angle) + a.y * cos(angle));
return vec2(
a.x * cos(angle) - a.y * sin(angle),
a.x * sin(angle) + a.y * cos(angle)
);
}
// --------------------------------------------------------------------------------- noise
+152 -137
View File
@@ -32,24 +32,22 @@
// The width of the fading effect is loaded from the settings.
// use 8BitStyle or not
uniform bool u8BitStyle;
// use 8BitStyle or not (sliding scale)
uniform float uScaleStyle;
//these are for the 4 point stars (or sparks)
uniform bool uEnable4PStars;
uniform float u4PStars;
uniform vec4 u4PSColor;
uniform float u4PSRotation;
//these are for the sparks
uniform float uSparkCount;
uniform vec4 uSparkColor;
uniform float uSparkRotation;
//these are for the Rays
uniform bool uEnableRays;
uniform vec4 uRaysColor;
//these are for the 5 pointed stars
uniform bool uEnable5pStars;
uniform float uRings;
//these are for the stars
uniform float uRingCount;
uniform float uRingRotation;
uniform float uStarPerRing;
uniform float uStarCount;
// and the colors they change over time
uniform vec4 uStarColor0;
uniform vec4 uStarColor1;
@@ -58,6 +56,9 @@ uniform vec4 uStarColor3;
uniform vec4 uStarColor4;
uniform vec4 uStarColor5;
//seed
uniform vec2 uSeed;
//helps to find the angle
vec3 getPosByAngle(float angle)
{
@@ -65,6 +66,7 @@ vec3 getPosByAngle(float angle)
}
//gets the mask of a Star
float getStar(vec2 uv, vec2 center, float npoints, float radiusRatio, float size, float rotation)
{
@@ -104,56 +106,65 @@ float getStar(vec2 uv, vec2 center, float npoints, float radiusRatio, float size
}
float getStarWithFade(vec2 uv, vec2 center, float npoints, float radiusRatio, float size, float rotation)
//use to scale the window
vec2 scaleUV(vec2 uv, vec2 scale)
{
float radiusMax = 1.0;
float radiusMin = radiusMax * radiusRatio;
float PI = 3.1415926;
float starangle = 2.0 * PI / npoints; // Angle between points on the star
// Put texture coordinate origin to center of window.
uv = uv * 2.0 - 1.0;
// Offset rotation to ensure one point is always up when rotation = 0
rotation += PI / 2.0 - starangle / 1.0;
//scale
uv /= mix(vec2(1.0,1.0), vec2(0.0,0.0), scale);
// Define the positions for the outer and inner points of the star's initial angle, rotated by `rotation`
vec3 p0 = (radiusMax * size) * getPosByAngle(rotation); // Outer point, rotated by `rotation`
vec3 p1 = (radiusMin * size) * getPosByAngle(starangle + rotation); // Inner point, also rotated
// scale from center
uv = uv * 0.5 + 0.5;
// Calculate the position of the current fragment relative to the star's center
vec2 curPosuv = (uv - center); // Center UV coordinates, then scale to fit the star size
float curRadius = length(curPosuv); // Radius from center, no need to scale further
float curPosAngle = atan(curPosuv.y, curPosuv.x) - rotation; // Calculate angle and adjust by `rotation`
return uv;
}
// Determine the fractional position within the current star segment
float a = fract(curPosAngle / starangle); // Fractional angle position within one segment
if (a >= 0.5)
a = 1.0 - a; // Ensure we are within the first half of the segment (symmetry)
// Calculate the current point on the star segment, applying rotation
a = a * starangle; // Actual angle for this position on the segment
vec3 curPos = curRadius * getPosByAngle(a + rotation); // Final position, rotated
// Calculate directions for edge detection using cross product
vec3 dir0 = p1 - p0; // Vector from outer to inner point
vec3 dir1 = curPos - p0; // Vector from outer point to current position
float crossZ = dir0.x * dir1.y - dir0.y * dir1.x;
float result = remap(
crossZ,
0.0,0.03,//0.0275,
0.0,1.0 //hardness [1.0,100]
//rotates the UV
//needs to use this once since it rotates around the middle (i.e. 0.5)
vec2 rotateUV(vec2 uv, float rotation)
{
float mid = 0.5;
return vec2(
cos(rotation) * (uv.x - mid) + sin(rotation) * (uv.y - mid) + mid,
cos(rotation) * (uv.y - mid) - sin(rotation) * (uv.x - mid) + mid
);
//brightness
result = result * 7.0;
result = clamp(result,0.0,1.0);
result = easeInSine(result);
return result;
}
//this returns the Spark
float getSpark(vec2 uv, vec2 center, float brightness, float size, float rotation)
{
brightness = clamp(brightness,0.001,1.0);
size = clamp(size,0.001,1.0);
float bn = mix(0.0,0.07,brightness); //recalculate size
uv = (uv + vec2(0.5)) ;
uv = (uv - center) ;//Center UV coordinates, then scale to fit the star size
uv = scaleUV(uv, vec2(1.0 - size));
uv = rotateUV(uv, rotation); //rotate the UV
//this is basically the brightness
float p = mix(-1.0,1000.0,easeInExpo(bn));
float m = mix(
0.0,
1.0,
clamp(
pow(abs(uv.x-0.5)*2.0,p) + pow(abs(uv.y-0.5)*2.0,p),0.0,1.0
)
);
float mask = easeInSine(1.0 - (m - bn)) - 0.004 ;
mask = clamp(mask,0.0,1.0);
return mask;
}
//returns the star's color
vec4 getStarColor(float v, float alpha) {
// Clamp v to ensure it's in [0.0, 1.0]
v = clamp(v, 0.0, 1.0);
@@ -201,8 +212,8 @@ vec4 getStarColor(float v, float alpha) {
return vec4(0.0, 0.0, 0.0, 1.0);
}
float zeroStartEnd(float t, float max_size, float power)
{
// 1| __________
// | / \
// | / \
@@ -214,11 +225,11 @@ graph above ... where t is close to 0, or 1 the result will fade to zero
i.e. this is just the function of power(x,p) shifted
where x is time, and p is 2.0,4.0,8.0,10.0 ... or any positive even number
*/
float zeroStartEnd(float t, float max_size, float power)
{
float s = -1.0 * pow((t-0.5)/(0.5),power)+1.0;
s = clamp(s,0.0,1.0) * max_size;
return s;
}
//this gives us the jerky 8bit growth effect.
@@ -264,48 +275,50 @@ float eightBitScale(float progress)
return scale;
}
//use to scale the window
vec2 scaleUV(vec2 uv, vec2 scale)
//gets all the sparks
vec4 getSparks(float progress)
{
// Put texture coordinate origin to center of window.
uv = uv * 2.0 - 1.0;
//the UV for this function
float aspect = uSize.x / uSize.y;
vec2 uv = iTexCoord.st * vec2(aspect,1.0);
//scale
uv /= mix(vec2(1.0,1.0), vec2(0.0,0.0), scale);
// scale from center
uv = uv * 0.5 + 0.5;
return uv;
}
vec4 get4pStars(vec2 starUV, float progress)
{
//this will be the result to return
vec4 result = vec4(0.0);
vec2 h = vec2(0.0);
// 0 at the edges
float xEdge = -1.0 * pow((uv.x-(aspect*0.5))/(aspect*0.5),8.0)+1.0;
xEdge = clamp(xEdge,0.0,1.0);
//declare some variables before the loop
vec2 h = vec2(0.0);
float y = 0.0;
float x = 0.0;
for (float x = 0.0; x < u4PStars; ++x)
//loop for each spart
for (float xusp = 0.0; xusp < uSparkCount; ++xusp)
{
h = hash21(x);
y = mix( 0.0 - h.y , 1.0+(1.0-h.y) , (1.0 - progress));
//calculate some variables
h = hash21(xusp + uSeed.x);
y = mix( 0.0 - h.y , 1.0+(1.0-h.y) , progress);
y = clamp(y,0.0,1.0);
float a4ps = getStarWithFade(
starUV,
vec2( sin(h.x * 6.28 ) * 0.66, y), //position (x, y)
4.0, //nPoints
0.33, //radiusRatio
zeroStartEnd(y,0.1 ,4.0), //Size
progress * 6.28 * float(u4PSRotation) //rotation
x = 0.66 * sin(h.x * 6.28) ;
x += 0.5 * aspect;
//here we get the mask for the spark
float a4ps = getSpark(
uv,
vec2( x , y), //position (x, y)
zeroStartEnd(y,1.0 ,4.0) * xEdge ,//Brightness
zeroStartEnd(y,0.5 ,4.0) * xEdge,//Size
progress * 6.28 * float(uSparkRotation) //rotation
);
//set it to the results
result = alphaOver(
result,
vec4(u4PSColor.r,u4PSColor.g,u4PSColor.b,u4PSColor.a * a4ps)
vec4(uSparkColor.r,uSparkColor.g,uSparkColor.b,uSparkColor.a * a4ps)
);
}
@@ -313,17 +326,24 @@ vec4 get4pStars(vec2 starUV, float progress)
return result;
}
//gets the Rays
vec4 getRays(float progress)
{
//create the UV for it
vec2 rayUV = iTexCoord.st;
rayUV *= vec2(10.0,0.5);
rayUV.y += progress * -1.0;
rayUV.x += uSeed.y;
//gets the ray
float ray = simplex2D(rayUV);
//0 around the edges
ray *= zeroStartEnd(iTexCoord.t,1.0,8.0);
ray *= zeroStartEnd(iTexCoord.s,1.0,8.0);
// 0 at the begining and end of the animation
ray *= zeroStartEnd(progress,1.0,8.0);
//adjust the numbers and clamp
ray = remap(
ray * 1.10,
0.0,1.0,
@@ -331,11 +351,13 @@ vec4 getRays(float progress)
);
ray = clamp(ray,0.0,1.0);
//return
return vec4(uRaysColor.r,uRaysColor.g,uRaysColor.b,uRaysColor.a * ray);
}
vec4 get5PStars(vec2 starUV, float aspect, float progress, float oColorAlpha)
//returns the stars
vec4 getStars(vec2 starUV, float aspect, float progress, float oColorAlpha)
{
//this will be the result to return
vec4 result = vec4(0.0);
@@ -344,19 +366,19 @@ vec4 get5PStars(vec2 starUV, float aspect, float progress, float oColorAlpha)
float y = 0.0;
//for each ring
for (float r = 0.0; r < uRings; ++r)
for (float r = 0.0; r < uRingCount; ++r)
{
float spread = r*(1.0/uRings);
float spread = r*(1.0/uRingCount);
y = mix( 0.0 - spread , 1.0+(1.0-spread) , 1.0 - progress);
y = clamp(y,0.00001,0.99999);
//each star in each ring
for (float s = 0.0; s < uStarPerRing; ++s)
for (float s = 0.0; s < uStarCount; ++s)
{
float a5ps = getStar(
starUV,
vec2( sin(progress * uRingRotation * 6.28 + (s*(6.28/uStarPerRing))) * aspect * 0.33 , y), //position (x, y)
vec2( sin(progress * uRingRotation * 6.28 + (s*(6.28/uStarCount))) * aspect * 0.33 , y), //position (x, y)
5.0, //nPoints
0.5, //radiusRatio
zeroStartEnd(y,0.1,2.0), //Size
@@ -365,7 +387,7 @@ vec4 get5PStars(vec2 starUV, float aspect, float progress, float oColorAlpha)
a5ps = clamp(a5ps,0.0,1.0);
// //put the star in back or the front of the window
float depth = cos(progress * uRingRotation * 6.28 + (s*(6.28/uStarPerRing)) );
float depth = cos(progress * uRingRotation * 6.28 + (s*(6.28/uStarCount)) );
if (depth < 0.0)
{
result = alphaOver(result,getStarColor(y,a5ps));
@@ -395,55 +417,48 @@ void main() {
// Initialize the output color to fully transparent black
vec4 oColor = vec4(0.0, 0.0, 0.0, 0.0);
// Check if the 8-bit style is enabled
if (u8BitStyle)
//get scales
float scale8bit = eightBitScale(progress);
vec2 scaleV2 = vec2(easeInOutSine(progress), easeInQuad(progress));
vec2 fscale = mix(vec2(scale8bit),scaleV2,uScaleStyle);
// Fetch the color based on the scaled texture coordinates
oColor = getInputColor(
scaleUV(iTexCoord.st, fscale)
);
// Store the alpha value of the fetched color for later use
float oColorAlpha = oColor.a;
// Calculate the aspect ratio of the render area
float aspect = uSize.x / uSize.y;
// Transform UV coordinates for star effects
// starUV.x [-0.5 , 0.5]
// starUV.y [1.0 , 0.0]
vec2 starUV = vec2(iTexCoord.s - 0.5, 1.0 - iTexCoord.t) * vec2(aspect, 1.0);
// If four-point stars are enabled, overlay them on the current color
if (uSparkCount > 0.0)
{
// Scale UV coordinates using a custom 8-bit scaling function
float scale8bit = eightBitScale(progress);
// Fetch the color based on the scaled texture coordinates
oColor = getInputColor(
scaleUV(iTexCoord.st, vec2(scale8bit, scale8bit))
);
oColor = alphaOver(oColor, getSparks(progress));
}
else
// If rays are enabled, overlay them on the current color
if (uRaysColor.a > 0.0)
{
// Non-8-bit style: Calculate scaling factors using easing functions
vec2 scaleV2 = vec2(easeInOutSine(progress), easeInQuad(progress));
// Fetch the color based on the scaled texture coordinates
oColor = getInputColor(
scaleUV(iTexCoord.st, scaleV2)
);
// Store the alpha value of the fetched color for later use
float oColorAlpha = oColor.a;
// Calculate the aspect ratio of the render area
float aspect = uSize.x / uSize.y;
// Transform UV coordinates for star effects
vec2 starUV = vec2(iTexCoord.s - 0.5, 1.0 - iTexCoord.t) * vec2(aspect, 1.0);
// If four-point stars are enabled, overlay them on the current color
if (uEnable4PStars)
{
oColor = alphaOver(oColor, get4pStars(starUV, progress));
}
// If rays are enabled, overlay them on the current color
if (uEnableRays)
{
oColor = alphaOver(oColor, getRays(progress));
}
// If five-point stars are enabled, overlay them using stored alpha
if (uEnable5pStars)
{
oColor = alphaOver(oColor, get5PStars(starUV, aspect, progress, oColorAlpha));
}
oColor = alphaOver(oColor, getRays(progress));
}
// If five-point stars are enabled, overlay them using stored alpha
if (uRingCount > 0.0 && uStarCount > 0.0)
{
oColor = alphaOver(oColor, getStars(starUV, aspect, progress, oColorAlpha));
}
// Set the final output color to the computed value
setOutputColor(oColor);
+153 -182
View File
@@ -13,60 +13,52 @@ SPDX-License-Identifier: GPL-3.0-or-later
<!-- Animation Time Adjustment Section -->
<child>
<object class="AdwActionRow">
<!-- Title for the animation time adjustment slider -->
<property name="title" translatable="yes">Animation Time [ms]</property>
<child>
<!-- Slider for adjusting animation duration -->
<object class="GtkScale">
<property name="valign">center</property>
<property name="draw-value">1</property> <!-- Display the current value -->
<property name="digits">0</property> <!-- Number of decimal places -->
<property name="value-pos">left</property> <!-- Position of the displayed value -->
<property name="width-request">300</property> <!-- Width of the slider -->
<!-- Adjustment settings for the slider -->
<property name="draw-value">1</property>
<property name="digits">0</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="mushroom-animation-time">
<property name="upper">5000</property> <!-- Maximum value -->
<property name="lower">100</property> <!-- Minimum value -->
<property name="step-increment">10</property> <!-- Smallest increment -->
<property name="page-increment">100</property> <!-- Larger increment -->
<property name="upper">5000</property>
<property name="lower">100</property>
<property name="step-increment">10</property>
<property name="page-increment">100</property>
</object>
</property>
</object>
</child>
<!-- Button to reset animation time to its default value -->
<child>
<object class="GtkButton" id="reset-mushroom-animation-time">
<property name="icon-name">edit-clear-symbolic</property> <!-- Reset icon -->
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
<class name="flat" /> <!-- Flat button style -->
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
<!-- 8Bit Style Toggle Section -->
<!-- Star Color Presets -->
<child>
<object class="AdwActionRow">
<!-- Title and description for 8Bit style toggle -->
<property name="title" translatable="yes">8Bit Style</property>
<property name="subtitle" translatable="yes">If ON an old 8Bit Style will be used</property>
<!-- Toggle switch for enabling or disabling 8Bit style -->
<property name="activatable-widget">mushroom-8bit-enable</property>
<property name="title" translatable="yes">Color Presets</property>
<property name="activatable-widget">mushroom-star-color-preset-button</property>
<child>
<object class="GtkSwitch" id="mushroom-8bit-enable">
<object class="GtkMenuButton" id="mushroom-star-color-preset-button">
<property name="valign">center</property>
</object>
</child>
<!-- Button to reset the 8Bit style toggle to its default value -->
<child>
<object class="GtkButton" id="reset-mushroom-8bit-enable">
<property name="icon-name">edit-clear-symbolic</property> <!-- Reset icon -->
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<property name="label" translatable="yes">Choose a Preset</property>
<style>
<class name="flat" />
</style>
@@ -74,23 +66,35 @@ SPDX-License-Identifier: GPL-3.0-or-later
</child>
</object>
</child>
<!-- Toggle for showing 4-Point Stars (Sparks) -->
<child>
<object class="AdwActionRow">
<!-- Title for enabling or disabling 4-point stars -->
<property name="title" translatable="yes">Show 4Point Stars (Sparks)</property>
<!-- Switch for toggling visibility of 4-point stars -->
<property name="activatable-widget">mushroom-4pstars-enable</property>
<property name="title" translatable="yes">Scale Style</property>
<property name="subtitle" translatable="yes">8Bit --- Smooth</property>
<child>
<object class="GtkSwitch" id="mushroom-4pstars-enable">
<object class="GtkScale" id="mushroom-scale-style-scale">
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">2</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="mushroom-scale-style">
<property name="upper">1.0</property>
<property name="lower">0.0</property>
<property name="step-increment">0.1</property>
<property name="page-increment">0.25</property>
</object>
</property>
</object>
</child>
<!-- Button to reset 4-point stars visibility to default -->
<child>
<object class="GtkButton" id="reset-mushroom-4pstars-enable">
<property name="icon-name">edit-clear-symbolic</property> <!-- Reset icon -->
<object class="GtkButton" id="reset-mushroom-scale-style">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
@@ -104,31 +108,69 @@ SPDX-License-Identifier: GPL-3.0-or-later
<!-- Adjustment for 4-Point Stars Count -->
<child>
<object class="AdwActionRow">
<!-- Title for the slider controlling the count of 4-point stars -->
<property name="title" translatable="yes">4Point Star (Sparks) Count</property>
<!-- Slider for adjusting the count of 4-point stars -->
<property name="title" translatable="yes">Spark Count</property>
<child>
<object class="GtkScale" id="mushroom-4pstars-count-scale">
<object class="GtkScale" id="mushroom-spark-count-scale">
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">0</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<!-- Adjustment settings for the slider -->
<property name="adjustment">
<object class="GtkAdjustment" id="mushroom-4pstars-count">
<property name="upper">100</property> <!-- Maximum count -->
<property name="lower">0</property> <!-- Minimum count -->
<property name="step-increment">1</property> <!-- Step size -->
<property name="page-increment">5</property> <!-- Page increment size -->
<object class="GtkAdjustment" id="mushroom-spark-count">
<property name="upper">25</property>
<property name="lower">0</property>
<property name="step-increment">1</property>
<property name="page-increment">5</property>
</object>
</property>
</object>
</child>
<!-- Button to reset 4-point stars count to default -->
<child>
<object class="GtkButton" id="reset-mushroom-4pstars-count">
<property name="icon-name">edit-clear-symbolic</property> <!-- Reset icon -->
<object class="GtkButton" id="reset-mushroom-spark-count">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
<!-- Adjustment for 4-Point Stars Count -->
<child>
<object class="AdwActionRow">
<property name="title" translatable="yes">Spark Rotation</property>
<child>
<object class="GtkScale" >
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">2</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<property name="adjustment">
<object class="GtkAdjustment" id="mushroom-spark-rotation">
<property name="upper">3.0</property>
<property name="lower">-3.0</property>
<property name="step-increment">0.5</property>
<property name="page-increment">0.25</property>
</object>
</property>
</object>
</child>
<child>
<object class="GtkButton" id="reset-mushroom-spark-rotation">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
@@ -142,53 +184,27 @@ SPDX-License-Identifier: GPL-3.0-or-later
<!-- Color Picker for 4-Point Stars -->
<child>
<object class="AdwActionRow">
<!-- Title for the 4-point stars color picker -->
<property name="title" translatable="yes">4Point Star (Sparks) Color</property>
<!-- Color picker for customizing the 4-point stars -->
<property name="title" translatable="yes">Spark Color</property>
<child>
<object class="GtkBox">
<style>
<class name="linked" />
</style>
<child>
<object class="GtkColorButton" id="mushroom-4pstars-color">
<property name="use_alpha">1</property> <!-- Enable alpha channel -->
<property name="show_editor">1</property> <!-- Show advanced editor -->
<object class="GtkColorButton" id="mushroom-spark-color">
<property name="use_alpha">1</property>
<property name="show_editor">1</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<!-- Button to reset the color picker to default -->
<child>
<object class="GtkButton" id="reset-mushroom-4pstars-color">
<property name="icon-name">edit-clear-symbolic</property> <!-- Reset icon -->
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
<!-- Rays Toggle -->
<child>
<object class="AdwActionRow">
<!-- Title for enabling or disabling rays -->
<property name="title" translatable="yes">Show Rays</property>
<!-- Toggle switch for controlling the visibility of rays -->
<property name="activatable-widget">mushroom-rays-enable</property>
<child>
<object class="GtkSwitch" id="mushroom-rays-enable">
<property name="valign">center</property>
</object>
</child>
<!-- Button to reset the rays toggle to its default value -->
<child>
<object class="GtkButton" id="reset-mushroom-rays-enable">
<property name="icon-name">edit-clear-symbolic</property> <!-- Reset icon -->
<object class="GtkButton" id="reset-mushroom-spark-color">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
@@ -202,9 +218,9 @@ SPDX-License-Identifier: GPL-3.0-or-later
<!-- Rays Color Picker -->
<child>
<object class="AdwActionRow">
<!-- Title for the rays color picker -->
<property name="title" translatable="yes">Rays Color</property>
<!-- Color picker for customizing rays -->
<child>
<object class="GtkBox">
<style>
@@ -212,43 +228,17 @@ SPDX-License-Identifier: GPL-3.0-or-later
</style>
<child>
<object class="GtkColorButton" id="mushroom-rays-color">
<property name="use_alpha">1</property> <!-- Enable alpha channel -->
<property name="show_editor">1</property> <!-- Show advanced editor -->
<property name="use_alpha">1</property>
<property name="show_editor">1</property>
<property name="valign">center</property>
</object>
</child>
</object>
</child>
<!-- Button to reset the rays color picker to its default value -->
<child>
<object class="GtkButton" id="reset-mushroom-rays-color">
<property name="icon-name">edit-clear-symbolic</property> <!-- Reset icon -->
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
<!-- Star Rings Toggle -->
<child>
<object class="AdwActionRow">
<!-- Title for enabling or disabling star rings -->
<property name="title" translatable="yes">Show Star Rings</property>
<!-- Toggle switch for controlling the visibility of star rings -->
<property name="activatable-widget">mushroom-5pstars-enable</property>
<child>
<object class="GtkSwitch" id="mushroom-5pstars-enable">
<property name="valign">center</property>
</object>
</child>
<!-- Button to reset the star rings toggle to its default value -->
<child>
<object class="GtkButton" id="reset-mushroom-5pstars-enable">
<property name="icon-name">edit-clear-symbolic</property> <!-- Reset icon -->
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
@@ -262,31 +252,31 @@ SPDX-License-Identifier: GPL-3.0-or-later
<!-- Star Rings Count Adjustment -->
<child>
<object class="AdwActionRow">
<!-- Title for the slider controlling the number of star rings -->
<property name="title" translatable="yes">Star Rings Count</property>
<!-- Slider for adjusting the number of star rings -->
<child>
<object class="GtkScale" id="mushroom-5pstarring-count-scale">
<object class="GtkScale" id="mushroom-ring-count-scale">
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">0</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<!-- Adjustment settings for the slider -->
<property name="adjustment">
<object class="GtkAdjustment" id="mushroom-5pstarring-count">
<property name="upper">10</property> <!-- Maximum count -->
<property name="lower">1</property> <!-- Minimum count -->
<property name="step-increment">1</property> <!-- Step size -->
<property name="page-increment">3</property> <!-- Page increment size -->
<object class="GtkAdjustment" id="mushroom-ring-count">
<property name="upper">5</property>
<property name="lower">0</property>
<property name="step-increment">1</property>
<property name="page-increment">3</property>
</object>
</property>
</object>
</child>
<!-- Button to reset the star rings count to its default value -->
<child>
<object class="GtkButton" id="reset-mushroom-5pstarring-count">
<property name="icon-name">edit-clear-symbolic</property> <!-- Reset icon -->
<object class="GtkButton" id="reset-mushroom-ring-count">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
@@ -300,31 +290,31 @@ SPDX-License-Identifier: GPL-3.0-or-later
<!-- Star Rings Rotation Adjustment -->
<child>
<object class="AdwActionRow">
<!-- Title for the slider controlling the rotation of star rings -->
<property name="title" translatable="yes">Star Ring Rotation</property>
<!-- Slider for adjusting the rotation of star rings -->
<child>
<object class="GtkScale" id="mushroom-5pstarring-rotation-scale">
<object class="GtkScale" id="mushroom-ring-rotation-scale">
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">2</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<!-- Adjustment settings for the slider -->
<property name="adjustment">
<object class="GtkAdjustment" id="mushroom-5pstarring-rotation">
<property name="upper">5.0</property> <!-- Maximum rotation -->
<property name="lower">-5.0</property> <!-- Minimum rotation -->
<property name="step-increment">0.25</property> <!-- Step size -->
<property name="page-increment">1.0</property> <!-- Page increment size -->
<object class="GtkAdjustment" id="mushroom-ring-rotation">
<property name="upper">3.0</property>
<property name="lower">-3.0</property>
<property name="step-increment">0.25</property>
<property name="page-increment">1.0</property>
</object>
</property>
</object>
</child>
<!-- Button to reset the star rings rotation to its default value -->
<child>
<object class="GtkButton" id="reset-mushroom-5pstarring-rotation">
<property name="icon-name">edit-clear-symbolic</property> <!-- Reset icon -->
<object class="GtkButton" id="reset-mushroom-ring-rotation">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
@@ -338,31 +328,31 @@ SPDX-License-Identifier: GPL-3.0-or-later
<!-- Stars Per Star Ring Count Adjustment -->
<child>
<object class="AdwActionRow">
<!-- Title for the slider controlling the number of stars per ring -->
<property name="title" translatable="yes">Stars Per Star Ring Count</property>
<!-- Slider for adjusting the number of stars per star ring -->
<property name="title" translatable="yes">Stars Count Per Ring</property>
<child>
<object class="GtkScale" id="mushroom-5pstars-count-scale">
<object class="GtkScale" id="mushroom-star-count-scale">
<property name="valign">center</property>
<property name="draw-value">1</property>
<property name="digits">0</property>
<property name="value-pos">left</property>
<property name="width-request">300</property>
<!-- Adjustment settings for the slider -->
<property name="adjustment">
<object class="GtkAdjustment" id="mushroom-5pstars-count">
<property name="upper">10</property> <!-- Maximum stars per ring -->
<property name="lower">1</property> <!-- Minimum stars per ring -->
<property name="step-increment">1</property> <!-- Step size -->
<property name="page-increment">3</property> <!-- Page increment size -->
<object class="GtkAdjustment" id="mushroom-star-count">
<property name="upper">7</property>
<property name="lower">0</property>
<property name="step-increment">1</property>
<property name="page-increment">3</property>
</object>
</property>
</object>
</child>
<!-- Button to reset the stars per ring count to its default value -->
<child>
<object class="GtkButton" id="reset-mushroom-5pstars-count">
<property name="icon-name">edit-clear-symbolic</property> <!-- Reset icon -->
<object class="GtkButton" id="reset-mushroom-star-count">
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>
@@ -373,41 +363,22 @@ SPDX-License-Identifier: GPL-3.0-or-later
</object>
</child>
<!-- Star Color Presets -->
<child>
<object class="AdwActionRow">
<!-- Title for selecting color presets -->
<property name="title" translatable="yes">Color Presets</property>
<property name="activatable-widget">mushroom-star-color-preset-button</property>
<!-- Dropdown menu for selecting predefined color presets -->
<child>
<object class="GtkMenuButton" id="mushroom-star-color-preset-button">
<property name="valign">center</property>
<property name="label" translatable="yes">Choose a Preset</property>
<style>
<class name="flat" />
</style>
</object>
</child>
</object>
</child>
<!-- Star Gradient Color Adjustment -->
<child>
<object class="AdwActionRow">
<!-- Title for the star gradient color settings -->
<property name="title" translatable="yes">Star Gradient</property>
<!-- Box containing multiple color pickers for gradient customization -->
<child>
<object class="GtkBox">
<style>
<class name="linked" />
</style>
<!-- Individual color pickers for each gradient step -->
<child>
<object class="GtkColorButton" id="mushroom-star-color-0">
<property name="use_alpha">1</property> <!-- Enable alpha channel -->
<property name="show_editor">1</property> <!-- Show advanced editor -->
<property name="use_alpha">1</property>
<property name="show_editor">1</property>
<property name="valign">center</property>
</object>
</child>
@@ -448,10 +419,10 @@ SPDX-License-Identifier: GPL-3.0-or-later
</child>
</object>
</child>
<!-- Button to reset all star gradient colors to their default values -->
<child>
<object class="GtkButton" id="reset-star-colors">
<property name="icon-name">edit-clear-symbolic</property> <!-- Reset icon -->
<property name="icon-name">edit-clear-symbolic</property>
<property name="valign">center</property>
<property name="tooltip-text" translatable="yes">Reset to Default Value</property>
<style>