From d7d094d70abd8824e2c6237c24d004e48e0d1748 Mon Sep 17 00:00:00 2001 From: kfj001 Date: Fri, 1 May 2026 02:29:20 +0000 Subject: [PATCH] Linux build system correction. New visual treatment Co-authored-by: Copilot --- lib/app_theme_business_object.dart | 101 +++++++++++++++++++---- lib/main.dart | 125 +++++++++++++++++++++-------- linux/CMakeLists.txt | 2 +- pubspec.yaml | 2 + 4 files changed, 179 insertions(+), 51 deletions(-) diff --git a/lib/app_theme_business_object.dart b/lib/app_theme_business_object.dart index 279462f..3341bba 100644 --- a/lib/app_theme_business_object.dart +++ b/lib/app_theme_business_object.dart @@ -3,6 +3,12 @@ import 'package:flutter/material.dart'; class AppThemeColors { const AppThemeColors({ required this.primarySeed, + required this.secondarySeed, + required this.scaffoldGradientStart, + required this.scaffoldGradientEnd, + required this.shellSurface, + required this.shellBorder, + required this.accent, required this.webViewBorder, required this.webViewBackground, required this.controlsGradientStart, @@ -12,6 +18,12 @@ class AppThemeColors { }); final Color primarySeed; + final Color secondarySeed; + final Color scaffoldGradientStart; + final Color scaffoldGradientEnd; + final Color shellSurface; + final Color shellBorder; + final Color accent; final Color webViewBorder; final Color webViewBackground; final Color controlsGradientStart; @@ -22,23 +34,35 @@ class AppThemeColors { class AppThemeBusinessObject { static const AppThemeColors lightColors = AppThemeColors( - primarySeed: Color(0xFF607D8B), - webViewBorder: Color(0x42000000), + primarySeed: Color(0xFFE36A18), + secondarySeed: Color(0xFF1663C7), + scaffoldGradientStart: Color(0xFFFFF3E3), + scaffoldGradientEnd: Color(0xFFE6F2FF), + shellSurface: Color(0xF7FFFFFF), + shellBorder: Color(0x1A1A4D86), + accent: Color(0xFF0F5DB6), + webViewBorder: Color(0x261A4D86), webViewBackground: Color(0xFFFFFFFF), - controlsGradientStart: Color(0xFFE1F5FE), - controlsGradientEnd: Color(0xFFB3E5FC), - controlsShadow: Color(0x22000000), - statusText: Color(0xDD000000), + controlsGradientStart: Color(0xFFFFB465), + controlsGradientEnd: Color(0xFF69ADFF), + controlsShadow: Color(0x24114B7A), + statusText: Color(0xFF13243D), ); static const AppThemeColors darkColors = AppThemeColors( - primarySeed: Color(0xFF37474F), - webViewBorder: Color(0x66FFFFFF), - webViewBackground: Color(0xFF0F1417), - controlsGradientStart: Color(0xFF1B2731), - controlsGradientEnd: Color(0xFF233744), + primarySeed: Color(0xFFFF9D59), + secondarySeed: Color(0xFF76B8FF), + scaffoldGradientStart: Color(0xFF0F1C30), + scaffoldGradientEnd: Color(0xFF31190C), + shellSurface: Color(0xD9162438), + shellBorder: Color(0x3366AAFF), + accent: Color(0xFFFFBC7E), + webViewBorder: Color(0x3378B7FF), + webViewBackground: Color(0xFF0C1420), + controlsGradientStart: Color(0xFF275792), + controlsGradientEnd: Color(0xFF9A4F1F), controlsShadow: Color(0x44000000), - statusText: Color(0xE6FFFFFF), + statusText: Color(0xFFF4F7FF), ); static bool isDarkMode(BuildContext context) { @@ -50,19 +74,62 @@ class AppThemeBusinessObject { } static ThemeData lightTheme() { + final ColorScheme scheme = + ColorScheme.fromSeed( + seedColor: lightColors.primarySeed, + brightness: Brightness.light, + ).copyWith( + primary: lightColors.primarySeed, + secondary: lightColors.secondarySeed, + tertiary: const Color(0xFF2C85E1), + surface: const Color(0xFFFFFBF7), + onSurface: lightColors.statusText, + ); + return ThemeData( - colorScheme: ColorScheme.fromSeed(seedColor: lightColors.primarySeed), useMaterial3: true, + colorScheme: scheme, + scaffoldBackgroundColor: scheme.surface, + elevatedButtonTheme: ElevatedButtonThemeData( + style: ElevatedButton.styleFrom( + backgroundColor: scheme.primary, + foregroundColor: scheme.onPrimary, + padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 14), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(16), + ), + ), + ), ); } static ThemeData darkTheme() { + final ColorScheme scheme = + ColorScheme.fromSeed( + seedColor: darkColors.primarySeed, + brightness: Brightness.dark, + ).copyWith( + primary: darkColors.primarySeed, + secondary: darkColors.secondarySeed, + tertiary: const Color(0xFF4E97E8), + surface: const Color(0xFF111A27), + onSurface: darkColors.statusText, + ); + return ThemeData( - colorScheme: ColorScheme.fromSeed( - seedColor: darkColors.primarySeed, - brightness: Brightness.dark, - ), useMaterial3: true, + colorScheme: scheme, + scaffoldBackgroundColor: scheme.surface, + elevatedButtonTheme: ElevatedButtonThemeData( + style: ElevatedButton.styleFrom( + backgroundColor: scheme.primary, + foregroundColor: scheme.onPrimary, + padding: const EdgeInsets.symmetric(horizontal: 18, vertical: 14), + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular(16), + ), + ), + ), ); } } diff --git a/lib/main.dart b/lib/main.dart index 59e1cde..e42a21a 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -118,31 +118,84 @@ class _MainPageState extends State { @override Widget build(BuildContext context) { final themeColors = AppThemeBusinessObject.colorsFor(context); + final theme = Theme.of(context); return Scaffold( - body: SafeArea( - child: Column( - children: [ - Expanded( - flex: 9, - child: Padding( - padding: const EdgeInsets.all(12), - child: LiveInfoPanel( - liveInfo: _liveInfo, - themeColors: themeColors, - intervalOptions: _intervalOptions, - ), - ), - ), - Expanded( - flex: 1, - child: Padding( - padding: const EdgeInsets.fromLTRB(12, 0, 12, 12), - child: Container( + body: DecoratedBox( + decoration: BoxDecoration( + gradient: LinearGradient( + begin: Alignment.topLeft, + end: Alignment.bottomRight, + colors: [ + themeColors.scaffoldGradientStart, + themeColors.scaffoldGradientEnd, + ], + ), + ), + child: SafeArea( + child: Padding( + padding: const EdgeInsets.all(12), + child: Column( + children: [ + Container( width: double.infinity, - padding: const EdgeInsets.symmetric(horizontal: 16), + padding: const EdgeInsets.all(14), decoration: BoxDecoration( - borderRadius: BorderRadius.circular(20), + color: themeColors.shellSurface, + borderRadius: BorderRadius.circular(24), + border: Border.all(color: themeColors.shellBorder), + boxShadow: [ + BoxShadow( + color: themeColors.controlsShadow, + blurRadius: 18, + offset: const Offset(0, 10), + ), + ], + ), + child: Row( + children: [ + ClipRRect( + borderRadius: BorderRadius.circular(18), + child: Image.asset( + 'assets/icon/app_icon.png', + width: 72, + height: 72, + fit: BoxFit.cover, + ), + ), + const SizedBox(width: 14), + Expanded( + child: Text( + 'KRYZ Go!', + textAlign: TextAlign.center, + style: theme.textTheme.headlineMedium?.copyWith( + fontWeight: FontWeight.w900, + letterSpacing: 0.4, + color: themeColors.statusText, + ), + ), + ), + const SizedBox(width: 86), + ], + ), + ), + const SizedBox(height: 12), + Expanded( + child: LiveInfoPanel( + liveInfo: _liveInfo, + themeColors: themeColors, + intervalOptions: _intervalOptions, + ), + ), + const SizedBox(height: 12), + Container( + width: double.infinity, + padding: const EdgeInsets.symmetric( + horizontal: 16, + vertical: 14, + ), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(24), gradient: LinearGradient( begin: Alignment.topLeft, end: Alignment.bottomRight, @@ -155,33 +208,39 @@ class _MainPageState extends State { BoxShadow( color: themeColors.controlsShadow, blurRadius: 14, - offset: Offset(0, 6), + offset: const Offset(0, 6), ), ], ), - child: Row( - mainAxisAlignment: MainAxisAlignment.center, + child: Wrap( + alignment: WrapAlignment.center, + crossAxisAlignment: WrapCrossAlignment.center, + spacing: 12, + runSpacing: 12, children: [ - ElevatedButton( + ElevatedButton.icon( onPressed: _audio.isStopped ? _play : null, - child: const Text('▶️'), + icon: const Icon(Icons.play_arrow_rounded), + label: const Text('Play'), ), - const SizedBox(width: 12), - ElevatedButton( + ElevatedButton.icon( onPressed: _audio.isStopped ? null : _stop, - child: const Text('⏹️'), + icon: const Icon(Icons.stop_rounded), + label: const Text('Stop'), ), - const SizedBox(width: 16), Text( _playbackStatusLabel(), - style: TextStyle(color: themeColors.statusText), + style: theme.textTheme.titleSmall?.copyWith( + fontWeight: FontWeight.w700, + color: themeColors.statusText, + ), ), ], ), ), - ), + ], ), - ], + ), ), ), ); diff --git a/linux/CMakeLists.txt b/linux/CMakeLists.txt index 99f69f2..4e46d0f 100644 --- a/linux/CMakeLists.txt +++ b/linux/CMakeLists.txt @@ -1,6 +1,6 @@ # Project-level configuration. cmake_minimum_required(VERSION 3.13) -project(KRYZ Go! LANGUAGES CXX) +project(KRYZ_Go! LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. diff --git a/pubspec.yaml b/pubspec.yaml index 651687c..685e0db 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -63,6 +63,8 @@ flutter: # included with your application, so that you can use the icons in # the material Icons class. uses-material-design: true + assets: + - assets/icon/app_icon.png # To add assets to your application, add an assets section, like this: # assets: