feat: tray-first UX, text outline, start-at-login toggle, font max 200

- All settings move to flat tray menu; right-click on clock disabled
- ClockLabel: custom QPainterPath text rendering with configurable
  glyph outline (BorderColor) — verified pixel-level offscreen
- Fixed glyph positioning bug (baseline math) caught by isolated test
- Window auto-fits content (adjustSize) — no more oversized clock
- Start at Login: checkable tray item, persisted in QSettings,
  LaunchAgent enable/disable (TDD: roundTrip test caught disable()
  returning false when plist already absent)
- Color dialog: hex/HTML input + 'transparent' + native picker fallback;
  opaque colors stored as #RRGGBB
- Border: glyph outline instead of box border; background still painted
  in paintEvent (QSS doesn't render with WA_TranslucentBackground on macOS)
- Removed window shadow (setHasShadow:NO), no bold, SF Pro Rounded
- Font size dialogs allow up to 200 (was 72)
- macOS: icon template 16pt, light/dark auto-adapt; LaunchAgent points
  to /Applications install
This commit is contained in:
2026-08-19 22:41:33 +03:00
parent 6b9cb32534
commit d9008479c1
9 changed files with 402 additions and 61 deletions
+22
View File
@@ -1,5 +1,6 @@
#include "autostart_manager.h"
#include <QTemporaryDir>
#include <QtTest>
class AutoStartManagerTest : public QObject
@@ -8,6 +9,7 @@ class AutoStartManagerTest : public QObject
private slots:
void createsRunAtLoadLaunchAgent();
void roundTripsPlistRoundTrip();
};
void AutoStartManagerTest::createsRunAtLoadLaunchAgent()
@@ -21,6 +23,26 @@ void AutoStartManagerTest::createsRunAtLoadLaunchAgent()
QVERIFY(contents.contains("<true/>"));
}
void AutoStartManagerTest::roundTripsPlistRoundTrip()
{
// Disabled-by-default: no plist written when enable is false,
// enableForPath + disable must leave no residue.
QTemporaryDir home;
QVERIFY(home.isValid());
qputenv("HOME", home.path().toUtf8());
QVERIFY(AutoStartManager::disable());
QVERIFY(!QFile::exists(AutoStartManager::launchAgentPath()));
QVERIFY(!AutoStartManager::isEnabled());
QVERIFY(AutoStartManager::enableForPath("/Applications/Clouck.app/Contents/MacOS/Clouck"));
QVERIFY(AutoStartManager::isEnabled());
QVERIFY(QFile::exists(AutoStartManager::launchAgentPath()));
QVERIFY(AutoStartManager::disable());
QVERIFY(!AutoStartManager::isEnabled());
}
QTEST_APPLESS_MAIN(AutoStartManagerTest)
#include "autostart_manager_test.moc"