Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
- Локальная сборка помечается версией `0.0.0-dev` (реальную версию в релизные билды подставляет CI
из тега) — самосборный билд больше не выдаёт себя за релизный.

### Исправлено
- **Иконки режимов «Эко» и «Тихий» были перепутаны местами** с самых первых версий: Эко рисовался
луной со звёздами, Тихий — листом. Теперь как задумано: **лист — Эко** (экономия), **луна —
Тихий** (тишина). Поменялись местами и рисунок, и анимация (покачивание листа ↔ мерцание звёзд),
и акцент ячейки в панели (зелёный ↔ сизый) — в панели, OSD и трее. Первопричина была в
двусмысленной строке спецификации иконок «лист (эко/тихий)» — она переписана однозначно (XIC-14).

## [0.7.0] — 2026-07-28

### Добавлено
Expand Down
9 changes: 1 addition & 8 deletions assets/svg/osd/perf-eco.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
9 changes: 8 additions & 1 deletion assets/svg/osd/perf-quiet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 1 addition & 4 deletions assets/svg/tray/tray-perf-eco.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 4 additions & 1 deletion assets/svg/tray/tray-perf-quiet.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions docs/08-icon-assets-spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,18 @@
| `mode-turbo.svg` | **Молния** (турбо) | одна молния |
| `mode-full.svg` | **Две молнии** (полная мощность) | две отдельные, читаемые как две |

> ⚠️ Формулировка «лист (эко/тихий)» выше — историческая и **двусмысленная**: из-за неё Эко и
> Тихий разъехались по иконкам и приехали в релиз перепутанными (исправлено XIC-14). Актуальный
> маппинг — однозначный, файлы называются по режиму:
>
> | Режим | Рисунок | Файлы (`assets/svg/`) | Анимация | Акцент ячейки |
> |---|---|---|---|---|
> | **Эко** | **лист** | `osd/perf-eco.svg`, `tray/tray-perf-eco.svg` | покачивание от ветерка (`DrawLeafSway`) | зелёный |
> | **Тихий** | **луна со звёздами** | `osd/perf-quiet.svg` (+ части `perf-quiet-moon/-star1/-star2`), `tray/tray-perf-quiet.svg` | мерцание звёзд в противофазе (`DrawMoonTwinkle`) | сизый |
>
> Мнемоника: лист = экономия, луна = тишина/сон. Составные части (`-moon`, `-star1/2`) нужны
> потому, что звёзды мерцают отдельно от луны — они всегда называются по тому же режиму, что и база.

### База / трей
| Файл | Что | Заметки |
|------|-----|---------|
Expand Down
2 changes: 1 addition & 1 deletion docs/10-colors.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
### Зелёный — батарея/эко
| Hex | Material | Где |
|---|---|---|
| `#8BC34A` | Light Green 500 | лист «Эко»/сбережения |
| `#8BC34A` | Light Green 500 | лист «Эко»/сбережения (акцент ячейки Эко — зелёный; у «Тихого» луна и сизый `125,160,185`) |
| `#4CAF50` | Green 500 | уровень заряда, «здоровье» |
| `#558B2F` | Light Green 800 | тёмная зелень |

Expand Down
4 changes: 2 additions & 2 deletions src/Ui/ModeUi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ internal static class ModeUi
/// <summary>Акцент ячейки режима в панели (палитра docs/10-colors.md).</summary>
public static Color Accent(PerfMode m) => m switch
{
PerfMode.Eco => Color.FromArgb(125, 160, 185), // сизый
PerfMode.Quiet => FlyoutPalette.Green,
PerfMode.Eco => FlyoutPalette.Green, // лист
PerfMode.Quiet => Color.FromArgb(125, 160, 185), // сизый — под луну
PerfMode.Auto => FlyoutPalette.Blue,
PerfMode.Turbo => FlyoutPalette.Orange,
PerfMode.FullSpeed => FlyoutPalette.Red,
Expand Down
4 changes: 2 additions & 2 deletions src/Ui/OsdForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -186,20 +186,20 @@
{
switch (kind)
{
case OsdKind.Auto: SvgIcons.DrawGauge(g, r, NeedleAngle()); return;

Check failure on line 189 in src/Ui/OsdForm.cs

View workflow job for this annotation

GitHub Actions / build-test

Fix whitespace formatting. Delete 4 characters.
case OsdKind.Quiet: SvgIcons.DrawLeafSway(g, r, _gaugeT, 1f); return;
case OsdKind.Quiet: SvgIcons.DrawMoonTwinkle(g, r, _gaugeT, 1f); return;

Check failure on line 190 in src/Ui/OsdForm.cs

View workflow job for this annotation

GitHub Actions / build-test

Fix whitespace formatting. Delete 3 characters.
case OsdKind.Turbo: SvgIcons.DrawBoltPulse(g, r, _gaugeT, 1f); return;

Check failure on line 191 in src/Ui/OsdForm.cs

View workflow job for this annotation

GitHub Actions / build-test

Fix whitespace formatting. Delete 3 characters.
case OsdKind.Full: SvgIcons.DrawRocket(g, r, _gaugeT, 1f); return;

Check failure on line 192 in src/Ui/OsdForm.cs

View workflow job for this annotation

GitHub Actions / build-test

Fix whitespace formatting. Delete 4 characters.
case OsdKind.Eco: SvgIcons.DrawMoonTwinkle(g, r, _gaugeT, 1f); return;
case OsdKind.Eco: SvgIcons.DrawLeafSway(g, r, _gaugeT, 1f); return;

Check failure on line 193 in src/Ui/OsdForm.cs

View workflow job for this annotation

GitHub Actions / build-test

Fix whitespace formatting. Delete 5 characters.
case OsdKind.Charging: SvgIcons.DrawChargingPulse(g, r, _gaugeT); return;
case OsdKind.Travel: SvgIcons.DrawTravelPulse(g, r, _gaugeT); return;

Check failure on line 195 in src/Ui/OsdForm.cs

View workflow job for this annotation

GitHub Actions / build-test

Fix whitespace formatting. Delete 2 characters.
}
string name = kind switch
{
OsdKind.Charging => SvgIcons.BatteryCharging,

Check failure on line 199 in src/Ui/OsdForm.cs

View workflow job for this annotation

GitHub Actions / build-test

Fix whitespace formatting. Delete 7 characters.
OsdKind.ChargingLimited => SvgIcons.BatterySaverOn,
OsdKind.OnBattery => SvgIcons.BatteryDischarge,

Check failure on line 201 in src/Ui/OsdForm.cs

View workflow job for this annotation

GitHub Actions / build-test

Fix whitespace formatting. Delete 6 characters.
OsdKind.CareOn => SvgIcons.BatterySaverOn,

Check failure on line 202 in src/Ui/OsdForm.cs

View workflow job for this annotation

GitHub Actions / build-test

Fix whitespace formatting. Delete 9 characters.
OsdKind.CareOff => SvgIcons.BatterySaverOff,
OsdKind.Eco => SvgIcons.PerfEco,
OsdKind.Quiet => SvgIcons.PerfQuiet,
Expand Down
4 changes: 2 additions & 2 deletions src/Ui/QuickPanelForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,8 @@ private void DrawModeIconAnimated(Graphics g, PerfMode m, RectangleF r, float op
{
switch (m)
{
case PerfMode.Eco: SvgIcons.DrawMoonTwinkle(g, r, _gaugeT, k, opacity, saturation); break;
case PerfMode.Quiet: SvgIcons.DrawLeafSway(g, r, _gaugeT, k, opacity, saturation); break;
case PerfMode.Eco: SvgIcons.DrawLeafSway(g, r, _gaugeT, k, opacity, saturation); break;
case PerfMode.Quiet: SvgIcons.DrawMoonTwinkle(g, r, _gaugeT, k, opacity, saturation); break;
case PerfMode.Auto: SvgIcons.DrawGauge(g, r, k * OsdForm.SweepAngle(_gaugeT), opacity, saturation); break;
case PerfMode.Turbo: SvgIcons.DrawBoltPulse(g, r, _gaugeT, k, opacity, saturation); break;
case PerfMode.FullSpeed: SvgIcons.DrawRocket(g, r, _gaugeT, k, opacity, saturation); break;
Expand Down
22 changes: 11 additions & 11 deletions src/Ui/SvgIcons.cs
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ public static class SvgIcons
public const string PerfAuto = "perf-auto";
public const string PerfAutoDial = "perf-auto-dial"; // спидометр без стрелки
public const string PerfAutoNeedle = "perf-auto-needle"; // стрелка, пивот в центре
public const string PerfEco = "perf-eco";
public const string PerfEco = "perf-eco"; // лист (экономия)
public const string PerfFull = "perf-full";
public const string PerfFullBody = "perf-full-body"; // ракета без пламени
public const string PerfFullFlame = "perf-full-flame"; // пламя отдельно
public const string PerfEcoMoon = "perf-eco-moon"; // луна без звёзд
public const string PerfEcoStar1 = "perf-eco-star1"; // звёзды по одной —
public const string PerfEcoStar2 = "perf-eco-star2"; // мерцают в противофазе
public const string PerfQuiet = "perf-quiet";
public const string PerfQuietMoon = "perf-quiet-moon"; // луна без звёзд
public const string PerfQuietStar1 = "perf-quiet-star1"; // звёзды по одной —
public const string PerfQuietStar2 = "perf-quiet-star2"; // мерцают в противофазе
public const string PerfQuiet = "perf-quiet"; // луна со звёздами (тишина)
public const string PerfTurbo = "perf-turbo";
public const string RefreshRate = "refresh-rate"; // монитор со стрелками — авто-герцовка вкл
public const string RefreshRateOff = "refresh-rate-off"; // то же серым — авто-герцовка выкл
Expand Down Expand Up @@ -151,7 +151,7 @@ private static void DrawBitmap(Graphics g, Bitmap bmp, RectangleF dest, float al
g.DrawImage(bmp, pts, src, GraphicsUnit.Pixel, attrs);
}

/// <summary>Лист (Тихий): покачивание вокруг основания черешка, как от ветерка.</summary>
/// <summary>Лист (Эко): покачивание вокруг основания черешка, как от ветерка.</summary>
public static void DrawLeafSway(Graphics g, RectangleF r, float t, float k, float opacity = 1f, float saturation = 1f)
{
int size = (int)Math.Round(Math.Min(r.Width, r.Height));
Expand All @@ -160,7 +160,7 @@ public static void DrawLeafSway(Graphics g, RectangleF r, float t, float k, floa
float px = dest.X + dest.Width * 0.25f, py = dest.Y + dest.Height * 0.84f; // основание черешка
var st = g.Save();
g.TranslateTransform(px, py); g.RotateTransform(ang); g.TranslateTransform(-px, -py);
DrawBitmap(g, Render(PerfQuiet, size), dest, opacity, 1f, saturation);
DrawBitmap(g, Render(PerfEco, size), dest, opacity, 1f, saturation);
g.Restore(st);
}

Expand Down Expand Up @@ -194,16 +194,16 @@ public static void DrawRocket(Graphics g, RectangleF r, float t, float k, float
DrawBitmap(g, Render(PerfFullBody, size), body, opacity, 1f, saturation);
}

/// <summary>Луна (Эко): звёзды мерцают в противофазе.</summary>
/// <summary>Луна (Тихий): звёзды мерцают в противофазе.</summary>
public static void DrawMoonTwinkle(Graphics g, RectangleF r, float t, float k, float opacity = 1f, float saturation = 1f)
{
int size = (int)Math.Round(Math.Min(r.Width, r.Height));
var dest = CenteredDest(r, size);
DrawBitmap(g, Render(PerfEcoMoon, size), dest, opacity, 1f, saturation);
DrawBitmap(g, Render(PerfQuietMoon, size), dest, opacity, 1f, saturation);
float a1 = 1f - 0.7f * k * (0.5f + 0.5f * MathF.Sin(t * 2.1f));
float a2 = 1f - 0.7f * k * (0.5f + 0.5f * MathF.Sin(t * 2.1f + 2.2f));
DrawBitmap(g, Render(PerfEcoStar1, size), dest, opacity * a1, 1f, saturation);
DrawBitmap(g, Render(PerfEcoStar2, size), dest, opacity * a2, 1f, saturation);
DrawBitmap(g, Render(PerfQuietStar1, size), dest, opacity * a1, 1f, saturation);
DrawBitmap(g, Render(PerfQuietStar2, size), dest, opacity * a2, 1f, saturation);
}

/// <summary>Батарея на зарядке: молния внутри мягко пульсирует.</summary>
Expand Down
Loading