diff --git a/assets/crystal-logo-minimal.png b/assets/crystal-logo-minimal.png new file mode 100644 index 0000000..727f637 Binary files /dev/null and b/assets/crystal-logo-minimal.png differ diff --git a/lib/functions/desktop.dart b/lib/functions/desktop.dart index e3996b0..9efd08c 100644 --- a/lib/functions/desktop.dart +++ b/lib/functions/desktop.dart @@ -71,8 +71,6 @@ Widget desktopView(currDesktop, setDesktop, next) { child: SingleChildScrollView( primary: false, child: Column( - //mainAxisAlignment: MainAxisAlignment.spaceEvenly, - //crossAxisAlignment: CrossAxisAlignment.stretch, children: desktops .map( (desktop) => desktopTemplate(desktop, setDesktop)) diff --git a/lib/functions/keyboard.dart b/lib/functions/keyboard.dart index 00eb81d..3f96904 100644 --- a/lib/functions/keyboard.dart +++ b/lib/functions/keyboard.dart @@ -120,8 +120,6 @@ Widget keyboard( child: SingleChildScrollView( primary: false, child: Column( - //mainAxisAlignment: MainAxisAlignment.spaceEvenly, - //crossAxisAlignment: CrossAxisAlignment.stretch, children: keymaps .map( (keymap) => layoutTemplate(keymap, setChosenLayout)) @@ -131,7 +129,6 @@ Widget keyboard( ), ), const SizedBox(width: 50), - //Expanded(child: layouts()), Expanded( child: Container( padding: const EdgeInsets.all(10), @@ -150,8 +147,6 @@ Widget keyboard( child: SingleChildScrollView( primary: false, child: Column( - //mainAxisAlignment: MainAxisAlignment.spaceEvenly, - //crossAxisAlignment: CrossAxisAlignment.stretch, children: chosenLayout.variant .map((map) => variantTemplate(map, chosenLayout, nextPage)) diff --git a/lib/functions/users.dart b/lib/functions/users.dart index 007aa2a..7280bc2 100644 --- a/lib/functions/users.dart +++ b/lib/functions/users.dart @@ -56,7 +56,7 @@ Widget users( mainAxisAlignment: MainAxisAlignment.spaceAround, crossAxisAlignment: CrossAxisAlignment.center, children: [ - const SizedBox(width: 10), + const SizedBox(width: 20), SizedBox( width: 600, child: Container( diff --git a/lib/functions/welcome.dart b/lib/functions/welcome.dart index 7ac456e..70513c5 100644 --- a/lib/functions/welcome.dart +++ b/lib/functions/welcome.dart @@ -1,71 +1,137 @@ import 'package:flutter/material.dart'; +import 'dart:io'; Widget welcome(next) { return Container( - decoration: const BoxDecoration( - image: DecorationImage( - fit: BoxFit.cover, - image: AssetImage('assets/welcome-bg-alt.png'), - ), - ), + //decoration: const BoxDecoration( + // image: DecorationImage( + // fit: BoxFit.cover, + // image: AssetImage('assets/welcome-bg-alt.png'), + // ), + //), child: Column( - mainAxisAlignment: MainAxisAlignment.spaceBetween, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - const SizedBox(height: 20), - Row( - mainAxisAlignment: MainAxisAlignment.center, - children: const [ - Text( - 'Welcome to Jade', - style: TextStyle( - fontSize: 50, - fontWeight: FontWeight.bold, - color: Color.fromARGB(255, 169, 0, 255)), - ), - ], + const SizedBox(height: 50), + const Text( + 'Welcome to Crystal Linux', + style: TextStyle( + fontSize: 30, + fontWeight: FontWeight.bold, + color: Color.fromARGB(255, 169, 0, 255), + ), ), - const SizedBox(height: 10), + const SizedBox(height: 20), Row( mainAxisAlignment: MainAxisAlignment.center, - children: const [ - Text( - 'Installing crystal made easy', - style: TextStyle( - fontSize: 40, - color: Color.fromARGB(255, 169, 0, 255), - ), - ), - ], - ), - Column( - mainAxisAlignment: MainAxisAlignment.end, + crossAxisAlignment: CrossAxisAlignment.center, children: [ - Row( - mainAxisAlignment: MainAxisAlignment.end, - children: [ - Column( - children: [ - TextButton( - onPressed: () { - next(); - }, - child: const Text('Start'), - style: TextButton.styleFrom( - primary: Colors.white, - backgroundColor: const Color.fromARGB(255, 169, 0, 255), - minimumSize: const Size(80, 50), - padding: const EdgeInsets.all(10), + ElevatedButton( + style: TextButton.styleFrom( + primary: const Color.fromARGB(0, 23, 23, 23), + backgroundColor: const Color.fromARGB(0, 23, 23, 23), + elevation: 0, + padding: EdgeInsets.zero, + ), + onPressed: () { + exit(0); + }, + child: Container( + width: 500, + height: 500, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: Border.all(color: Colors.black), + color: const Color.fromARGB(255, 30, 30, 30), + boxShadow: const [ + BoxShadow( + color: Colors.black, + blurRadius: 2, + offset: Offset(-2, 3), + ), + ], + ), + child: Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: const [ + SizedBox(height: 20), + Text("Try Crystal Linux without installing", + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + color: Colors.white)), + SizedBox(height: 5), + Image( + image: AssetImage( + 'assets/crystal-logo-minimal.png', + ), + height: 400, + fit: BoxFit.scaleDown, ), + ], + ), + ), + ), + ), + const SizedBox(width: 20), + ElevatedButton( + style: TextButton.styleFrom( + primary: const Color.fromARGB(0, 23, 23, 23), + backgroundColor: const Color.fromARGB(0, 23, 23, 23), + elevation: 0, + padding: EdgeInsets.zero, + ), + onPressed: next, + child: Container( + width: 500, + height: 500, + padding: const EdgeInsets.all(10), + decoration: BoxDecoration( + borderRadius: BorderRadius.circular(10), + border: Border.all(color: Colors.black), + color: const Color.fromARGB(255, 30, 30, 30), + boxShadow: const [ + BoxShadow( + color: Colors.black, + blurRadius: 2, + offset: Offset(-2, 3), ), - const SizedBox(height: 10), ], ), - const SizedBox(width: 30), - ], + child: Expanded( + child: Column( + mainAxisAlignment: MainAxisAlignment.spaceAround, + children: const [ + SizedBox(height: 20), + Text("Start the installation", + style: TextStyle( + fontSize: 20, + fontWeight: FontWeight.bold, + color: Colors.white)), + SizedBox(height: 5), + Image( + image: AssetImage( + 'assets/jade_logo.png', + ), + height: 400, + fit: BoxFit.scaleDown, + ), + ], + ), + ), + ), ), - const SizedBox(height: 7) ], ), + const SizedBox(height: 20), + const Text( + "Starting Crystal linux without installing will not change anything on your computer,", + style: TextStyle(fontSize: 20, color: Colors.white)), + const Text( + "it's recommended to try that first to see if everything works", + style: TextStyle(fontSize: 20, color: Colors.white)) ], ), ); diff --git a/lib/main.dart b/lib/main.dart index 07cc933..fe7fb7f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -230,16 +230,8 @@ class _JadeguiState extends State { } Widget condition() { - // other logic - // Declare a widget variable, - // it will be assigned later according - // to the condition Widget widget; - // Using switch statement to display desired - // widget if any certain condition is met - // You are free to use any condition - // For simplicity I have used boolean contition switch (_selectedIndex) { case 0: widget = welcome(() { @@ -370,17 +362,6 @@ class _JadeguiState extends State { }, ); break; - /*case 5: - print("Desktop: ${currDesktop.name}"); - widget = const Text( - 'Showing Desktop screen', - style: TextStyle( - fontSize: 18, - fontWeight: FontWeight.bold, - color: Color.fromARGB(255, 169, 0, 255), - ), - ); - break;*/ case 5: widget = const Text( 'Showing Misc screen', @@ -423,7 +404,7 @@ class _JadeguiState extends State { break; default: widget = const Text( - 'You should not see this, report this at git.tar.black/crystal/jade_gui', + 'You should not see this, report this at https://git.tar.black/crystal/jade_gui', style: TextStyle( fontSize: 18, fontWeight: FontWeight.bold,