Add release tooling and generated launcher icon

This commit is contained in:
ajp_anton
2026-06-13 10:37:25 +00:00
parent fbab6dac6a
commit dbf9560486
13 changed files with 928 additions and 193 deletions
@@ -12,6 +12,7 @@ import se.ajpanton.statusbartweak.runtime.features.clock.ClockLayoutTextFactory;
import se.ajpanton.statusbartweak.runtime.layoutsolver.StatusBarLayoutSolver.AnchorSide;
import se.ajpanton.statusbartweak.runtime.layoutsolver.StatusBarLayoutSolver.Bounds;
import se.ajpanton.statusbartweak.runtime.layoutsolver.StatusBarLayoutSolver.LayoutPosition;
import se.ajpanton.statusbartweak.shell.settings.SbtDefaults;
final class ClockLayout {
private static final int MIDDLE_COLLISION_MARGIN_PX = 2;
@@ -103,6 +104,7 @@ final class ClockLayout {
measuredRows = positionRowsFromLogicalSteps(
measuredRows,
Math.max(1, autoGapSteps),
Math.max(1, baseHeightSteps),
Math.max(1, statusbarHeight),
verticalOffsetSteps,
bottomRowBaselineAnchorY);
@@ -216,6 +218,7 @@ final class ClockLayout {
private static ArrayList<MeasuredClockRow> positionRowsFromLogicalSteps(
ArrayList<MeasuredClockRow> measuredRows,
int autoGapSteps,
int baseHeightSteps,
int statusbarHeight,
int verticalOffsetSteps,
int bottomRowBaselineAnchorY
@@ -238,7 +241,10 @@ final class ClockLayout {
}
} else {
MeasuredClockRow nextRow = measuredRows.get(rowIndex + 1);
int gapSteps = resolveGapSteps(nextRow.source.gapBeforePx, autoGapSteps);
int gapSteps = resolveGapSteps(
nextRow.source.gapBeforePx,
autoGapSteps,
baseHeightSteps);
topSteps = nextBottomSteps - gapSteps - Math.max(1, row.logicalHeightSteps);
bottomPx = nextBottomPx - stepsToPx(gapSteps, statusbarHeight);
}
@@ -657,11 +663,12 @@ final class ClockLayout {
return max > 0f ? max : 1f;
}
private static int resolveGapSteps(int gapBeforeSteps, int autoGapSteps) {
private static int resolveGapSteps(int gapBeforeSteps, int autoGapSteps, int baseHeightSteps) {
if (gapBeforeSteps == ClockLayoutTextFactory.ROW_GAP_AUTO) {
return Math.max(1, autoGapSteps);
}
return gapBeforeSteps;
int defaultSteps = Math.max(1, SbtDefaults.CLOCK_TEXT_SIZE_STEPS_DEFAULT);
return Math.round(gapBeforeSteps * Math.max(1, baseHeightSteps) / (float) defaultSteps);
}
private static int stepsToPx(int steps, int statusbarHeight) {
@@ -5,166 +5,6 @@
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
android:fillColor="#0D0B08"
android:pathData="M0,0 L108,0 L108,108 L0,108 Z" />
</vector>
@@ -1,30 +1,109 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
<aapt:attr name="android:fillColor">
<gradient
android:endX="85.84757"
android:endY="92.4963"
android:startX="42.9492"
android:startY="49.59793"
android:type="linear">
<item
android:color="#44000000"
android:offset="0.0" />
<item
android:color="#00000000"
android:offset="1.0" />
</gradient>
</aapt:attr>
</path>
<!-- Statusbar panel -->
<path
android:fillColor="#FFFFFF"
android:fillType="nonZero"
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
android:fillColor="#77746E"
android:pathData="M0,0 L108,0 L108,54 L0,54 Z" />
<!-- Camera cutout -->
<path
android:fillColor="#050403"
android:pathData="M51.8,0 L56.2,0 L56.2,36.8 C56.2,39 51.8,39 51.8,36.8 Z" />
<!-- Envelope -->
<path
android:fillColor="#00000000"
android:pathData="M39,22.5 L50,22.5 L50,30.5 L39,30.5 Z M39,22.5 L44.5,27.62 L50,22.5"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="1.3"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<!-- Battery outline -->
<path
android:fillColor="#00000000"
android:pathData="M59,23 L70,23 A1,1 0,0 1 71,24 L71,29.7 A1,1 0,0 1 70,30.7 L59,30.7 A1,1 0,0 1 58,29.7 L58,24 A1,1 0,0 1 59,23 Z M71,25.35 L73,25.35 L73,28.35 L71,28.35 Z"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="1"
android:strokeColor="#00000000" />
</vector>
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<!-- Battery fill -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M59.4,24.4 L66.54,24.4 L66.54,29.3 L59.4,29.3 Z" />
<!-- Mon -->
<path
android:fillColor="#00000000"
android:pathData="M31,39.6 L31,31.6 L33.48,36.24 L35.96,31.6 L35.96,39.6 M37.96,36.32 A1.9024,3.28 0,1 0 41.7648,36.32 A1.9024,3.28 0,1 0 37.96,36.32 M43.7648,39.6 L43.7648,33.04 C45.8574,33.04 47.5696,34.352 47.5696,39.6"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="1.1"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<!-- Wi-Fi -->
<path
android:fillColor="#00000000"
android:pathData="M61,36.5 C63.8,32.75 68.2,32.75 71,36.5 M63.2,39 C65,37 67,37 68.8,39"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="1.3"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<!-- Wi-Fi dot -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M65.1,41.5 A0.9,0.9 0,1 0 66.9,41.5 A0.9,0.9 0,1 0 65.1,41.5" />
<!-- Cellular bars -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M73,39.7 L74.8,39.7 L74.8,42.5 L73,42.5 Z M76,36.9 L77.8,36.9 L77.8,42.5 L76,42.5 Z M79,34.1 L80.8,34.1 L80.8,42.5 L79,42.5 Z" />
<!-- Clock 12:34 -->
<path
android:fillColor="#00000000"
android:pathData="M30,42.5 L30,47.5 M30,47.5 L30,52.5 M33,42.5 L38,42.5 M38,42.5 L38,47.5 M33,47.5 L38,47.5 M33,47.5 L33,52.5 M33,52.5 L38,52.5 M45,42.5 L50,42.5 M50,42.5 L50,47.5 M45,47.5 L50,47.5 M50,47.5 L50,52.5 M45,52.5 L50,52.5 M53,42.5 L53,47.5 M53,47.5 L58,47.5 M58,42.5 L58,47.5 M58,47.5 L58,52.5 M65,45.1 L68.6,45.1 M65,45.1 L65,48.7 M65,48.7 L68.6,48.7 M68.6,48.7 L68.6,52.3 M65,52.3 L68.6,52.3 M71,45.1 L74.6,45.1 M71,45.1 L71,48.7 M71,48.7 L74.6,48.7 M71,48.7 L71,52.3 M74.6,48.7 L74.6,52.3 M71,52.3 L74.6,52.3"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="1.55"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<!-- Clock colons -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M40.4,45.5 A1.1,1.1 0,1 0 42.6,45.5 A1.1,1.1 0,1 0 40.4,45.5 M40.4,49.5 A1.1,1.1 0,1 0 42.6,49.5 A1.1,1.1 0,1 0 40.4,49.5 M60.708,47.26 A0.792,0.792 0,1 0 62.292,47.26 A0.792,0.792 0,1 0 60.708,47.26 M60.708,50.14 A0.792,0.792 0,1 0 62.292,50.14 A0.792,0.792 0,1 0 60.708,50.14" />
<!-- Battery bar track -->
<path
android:fillColor="#2A2116"
android:pathData="M3,54 L105,54 A3,3 0,0 1 108,57 L108,57 A3,3 0,0 1 105,60 L3,60 A3,3 0,0 1 0,57 L0,57 A3,3 0,0 1 3,54 Z" />
<!-- Battery bar fill -->
<path
android:fillColor="#2FDB72"
android:pathData="M3,55 L72.6,55 A2,2 0,0 1 74.6,57 L74.6,57 A2,2 0,0 1 72.6,59 L3,59 A2,2 0,0 1 1,57 L1,57 A2,2 0,0 1 3,55 Z" />
<!-- SBT wordmark outer -->
<path
android:fillColor="#00000000"
android:pathData="M46,62.8 L35,62.8 L35,72.8 L46,72.8 L46,82.8 L35,82.8 M49.75,62.8 L49.75,82.8 M49.75,62.8 L58.39,62.8 L61.75,66.16 L61.75,69.44 L58.39,72.8 L49.75,72.8 M49.75,72.8 L58.39,72.8 L61.75,76.16 L61.75,79.44 L58.39,82.8 L49.75,82.8 M65.5,62.8 L78.5,62.8 M72,62.8 L72,82.8"
android:strokeColor="#FF9F1A"
android:strokeWidth="5"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<!-- SBT wordmark inner -->
<path
android:fillColor="#00000000"
android:pathData="M46,62.8 L35,62.8 L35,72.8 L46,72.8 L46,82.8 L35,82.8 M49.75,62.8 L49.75,82.8 M49.75,62.8 L58.39,62.8 L61.75,66.16 L61.75,69.44 L58.39,72.8 L49.75,72.8 M49.75,72.8 L58.39,72.8 L61.75,76.16 L61.75,79.44 L58.39,82.8 L49.75,82.8 M65.5,62.8 L78.5,62.8 M72,62.8 L72,82.8"
android:strokeColor="#FFF5DC"
android:strokeWidth="1.8"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</vector>
@@ -0,0 +1,100 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<!-- Statusbar panel -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M0,0 L108,0 L108,54 L0,54 Z" />
<!-- Camera cutout -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M51.8,0 L56.2,0 L56.2,36.8 C56.2,39 51.8,39 51.8,36.8 Z" />
<!-- Envelope -->
<path
android:fillColor="#00000000"
android:pathData="M39,22.5 L50,22.5 L50,30.5 L39,30.5 Z M39,22.5 L44.5,27.62 L50,22.5"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="1.3"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<!-- Battery outline -->
<path
android:fillColor="#00000000"
android:pathData="M59,23 L70,23 A1,1 0,0 1 71,24 L71,29.7 A1,1 0,0 1 70,30.7 L59,30.7 A1,1 0,0 1 58,29.7 L58,24 A1,1 0,0 1 59,23 Z M71,25.35 L73,25.35 L73,28.35 L71,28.35 Z"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="1"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<!-- Battery fill -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M59.4,24.4 L66.54,24.4 L66.54,29.3 L59.4,29.3 Z" />
<!-- Mon -->
<path
android:fillColor="#00000000"
android:pathData="M31,39.6 L31,31.6 L33.48,36.24 L35.96,31.6 L35.96,39.6 M37.96,36.32 A1.9024,3.28 0,1 0 41.7648,36.32 A1.9024,3.28 0,1 0 37.96,36.32 M43.7648,39.6 L43.7648,33.04 C45.8574,33.04 47.5696,34.352 47.5696,39.6"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="1.1"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<!-- Wi-Fi -->
<path
android:fillColor="#00000000"
android:pathData="M61,36.5 C63.8,32.75 68.2,32.75 71,36.5 M63.2,39 C65,37 67,37 68.8,39"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="1.3"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<!-- Wi-Fi dot -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M65.1,41.5 A0.9,0.9 0,1 0 66.9,41.5 A0.9,0.9 0,1 0 65.1,41.5" />
<!-- Cellular bars -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M73,39.7 L74.8,39.7 L74.8,42.5 L73,42.5 Z M76,36.9 L77.8,36.9 L77.8,42.5 L76,42.5 Z M79,34.1 L80.8,34.1 L80.8,42.5 L79,42.5 Z" />
<!-- Clock 12:34 -->
<path
android:fillColor="#00000000"
android:pathData="M30,42.5 L30,47.5 M30,47.5 L30,52.5 M33,42.5 L38,42.5 M38,42.5 L38,47.5 M33,47.5 L38,47.5 M33,47.5 L33,52.5 M33,52.5 L38,52.5 M45,42.5 L50,42.5 M50,42.5 L50,47.5 M45,47.5 L50,47.5 M50,47.5 L50,52.5 M45,52.5 L50,52.5 M53,42.5 L53,47.5 M53,47.5 L58,47.5 M58,42.5 L58,47.5 M58,47.5 L58,52.5 M65,45.1 L68.6,45.1 M65,45.1 L65,48.7 M65,48.7 L68.6,48.7 M68.6,48.7 L68.6,52.3 M65,52.3 L68.6,52.3 M71,45.1 L74.6,45.1 M71,45.1 L71,48.7 M71,48.7 L74.6,48.7 M71,48.7 L71,52.3 M74.6,48.7 L74.6,52.3 M71,52.3 L74.6,52.3"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="1.55"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
<!-- Clock colons -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M40.4,45.5 A1.1,1.1 0,1 0 42.6,45.5 A1.1,1.1 0,1 0 40.4,45.5 M40.4,49.5 A1.1,1.1 0,1 0 42.6,49.5 A1.1,1.1 0,1 0 40.4,49.5 M60.708,47.26 A0.792,0.792 0,1 0 62.292,47.26 A0.792,0.792 0,1 0 60.708,47.26 M60.708,50.14 A0.792,0.792 0,1 0 62.292,50.14 A0.792,0.792 0,1 0 60.708,50.14" />
<!-- Battery bar track -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M3,54 L105,54 A3,3 0,0 1 108,57 L108,57 A3,3 0,0 1 105,60 L3,60 A3,3 0,0 1 0,57 L0,57 A3,3 0,0 1 3,54 Z" />
<!-- Battery bar fill -->
<path
android:fillColor="#FFFFFFFF"
android:pathData="M3,55 L72.6,55 A2,2 0,0 1 74.6,57 L74.6,57 A2,2 0,0 1 72.6,59 L3,59 A2,2 0,0 1 1,57 L1,57 A2,2 0,0 1 3,55 Z" />
<!-- SBT wordmark -->
<path
android:fillColor="#00000000"
android:pathData="M46,62.8 L35,62.8 L35,72.8 L46,72.8 L46,82.8 L35,82.8 M49.75,62.8 L49.75,82.8 M49.75,62.8 L58.39,62.8 L61.75,66.16 L61.75,69.44 L58.39,72.8 L49.75,72.8 M49.75,72.8 L58.39,72.8 L61.75,76.16 L61.75,79.44 L58.39,82.8 L49.75,82.8 M65.5,62.8 L78.5,62.8 M72,62.8 L72,82.8"
android:strokeColor="#FFFFFFFF"
android:strokeWidth="5"
android:strokeLineCap="round"
android:strokeLineJoin="round" />
</vector>
@@ -2,5 +2,5 @@
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
</adaptive-icon>
<monochrome android:drawable="@drawable/ic_launcher_monochrome" />
</adaptive-icon>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB