From 019cd2dad02438c20d609375aeb2385d99a3bdd6 Mon Sep 17 00:00:00 2001 From: lukas-heiligenbrunner Date: Thu, 3 Nov 2022 00:39:29 +0100 Subject: [PATCH] some color adjustments --- lib/app.dart | 6 +- lib/canvas/paint_controller.dart | 6 +- lib/pages/all_notes_page.dart | 7 +- lib/widgets/collapse_drawer.dart | 12 ++-- lib/widgets/drawer_item.dart | 15 ++-- lib/widgets/tool_bar.dart | 113 ++++++++++++++++--------------- 6 files changed, 85 insertions(+), 74 deletions(-) diff --git a/lib/app.dart b/lib/app.dart index d39d257..0ab22d0 100644 --- a/lib/app.dart +++ b/lib/app.dart @@ -33,7 +33,7 @@ class _AppState extends State { ), Expanded( child: Container( - color: const Color(0xff0d0d0d), + color: const Color(0xff000000), child: _buildPage(), )) ], @@ -65,8 +65,8 @@ class _AppState extends State { ).then((v) => notifier.loadAllNotes()); }, backgroundColor: const Color(0xff3f3f3f), - child: - const Icon(Icons.edit_calendar_outlined, color: Colors.orange), + child: const Icon(Icons.edit_calendar_outlined, + color: Color(0xffff7300)), ), ); default: diff --git a/lib/canvas/paint_controller.dart b/lib/canvas/paint_controller.dart index 3496ac3..f17472f 100644 --- a/lib/canvas/paint_controller.dart +++ b/lib/canvas/paint_controller.dart @@ -43,8 +43,8 @@ class PaintController extends ChangeNotifier { alpha /= (2 * pi * 2); alpha += .5; - double thickness = basetickness * alpha; - return thickness; + basetickness * alpha; + return basetickness; } void pointDownEvent(Offset offset, PointerDownEvent e) async { @@ -60,7 +60,7 @@ class PaintController extends ChangeNotifier { [Point(offset, _calcTiltedWidth(3.0, e.tilt))], strokeid, activePen == Pen.pen - ? Colors.black26 + ? const Color(0xFF444444) : Colors.yellow.withOpacity(.5))); file.addStroke(strokeid); diff --git a/lib/pages/all_notes_page.dart b/lib/pages/all_notes_page.dart index 5f001cd..5b0ba79 100644 --- a/lib/pages/all_notes_page.dart +++ b/lib/pages/all_notes_page.dart @@ -18,7 +18,7 @@ class _AllNotesPageState extends State { return Column( children: [ SizedBox( - height: 10 + MediaQuery.of(context).viewPadding.top, + height: 25 + MediaQuery.of(context).viewPadding.top, ), Row( children: [ @@ -28,7 +28,7 @@ class _AllNotesPageState extends State { const Text( 'All notes', style: TextStyle( - color: Color.fromRGBO(255, 255, 255, .85), fontSize: 22), + color: Color.fromRGBO(255, 255, 255, .85), fontSize: 21), ), Expanded(child: Container()), IconMaterialButton( @@ -37,16 +37,19 @@ class _AllNotesPageState extends State { onPressed: () async { // todo implement pdf import }, + iconSize: 22, ), IconMaterialButton( icon: const Icon(Icons.search), color: const Color.fromRGBO(255, 255, 255, .85), onPressed: () {}, + iconSize: 22, ), IconMaterialButton( icon: const Icon(Icons.more_vert), color: const Color.fromRGBO(255, 255, 255, .85), onPressed: () {}, + iconSize: 22, ), const SizedBox( width: 15, diff --git a/lib/widgets/collapse_drawer.dart b/lib/widgets/collapse_drawer.dart index d3519ab..c0796eb 100644 --- a/lib/widgets/collapse_drawer.dart +++ b/lib/widgets/collapse_drawer.dart @@ -32,7 +32,8 @@ class _CollapseDrawerState extends State controller = AnimationController( vsync: this, duration: const Duration(milliseconds: 200)); - collapseAnimation = Tween(begin: 62, end: 300).animate(controller) + collapseAnimation = Tween(begin: 62, end: 300) + .animate(CurvedAnimation(parent: controller, curve: Curves.easeInOut)) ..addListener(() { setState(() {}); }); @@ -41,13 +42,14 @@ class _CollapseDrawerState extends State @override Widget build(BuildContext context) { return Container( - padding: EdgeInsets.only(top: MediaQuery.of(context).viewPadding.top), - color: const Color(0xff0d0d0d), + padding: + EdgeInsets.only(top: MediaQuery.of(context).viewPadding.top + 15), + color: const Color(0xff000000), child: ClipRRect( borderRadius: const BorderRadius.only( topRight: Radius.circular(10), bottomRight: Radius.circular(10)), child: Container( - color: const Color(0xff3f3f3f), + color: const Color(0xff252525), child: ConstrainedBox( constraints: BoxConstraints.expand(width: collapseAnimation.value), child: Column( @@ -103,7 +105,7 @@ class _CollapseDrawerState extends State ], ), const SizedBox( - height: 40, + height: 20, ), Expanded( child: ListView( diff --git a/lib/widgets/drawer_item.dart b/lib/widgets/drawer_item.dart index 758b90f..9e12b36 100644 --- a/lib/widgets/drawer_item.dart +++ b/lib/widgets/drawer_item.dart @@ -20,28 +20,29 @@ class DrawerItem extends StatelessWidget { return InkWell( onTap: onTap, child: Padding( - padding: const EdgeInsets.only(left: 9, top: 7, bottom: 7, right: 9), + padding: const EdgeInsets.only(left: 9, top: 2, bottom: 2, right: 9), child: ClipRRect( borderRadius: BorderRadius.circular(10), child: Container( - color: active ? const Color(0xff6e6e6e) : Colors.transparent, + color: active ? const Color(0xff4d4d4d) : Colors.transparent, child: Padding( padding: - const EdgeInsets.only(left: 9, top: 7, bottom: 7, right: 9), + const EdgeInsets.only(left: 9, top: 13, bottom: 13, right: 9), child: Row( children: [ Icon( dta.icon, - size: 26, - color: const Color(0xffdbdbdb), + size: 23, + color: const Color(0xffe5e5e5), ), if (!collapsed) ...[ const SizedBox( - width: 10, + width: 17, ), Text( dta.name, - style: const TextStyle(color: Color(0xffe9e9e9)), + style: const TextStyle( + color: Color(0xffe5e5e5), fontSize: 16), ), Expanded(child: Container()), Text( diff --git a/lib/widgets/tool_bar.dart b/lib/widgets/tool_bar.dart index 3ddb86b..06863f2 100644 --- a/lib/widgets/tool_bar.dart +++ b/lib/widgets/tool_bar.dart @@ -23,63 +23,68 @@ class _ToolBarState extends State { @override Widget build(BuildContext context) { return Container( - color: const Color(0xff3f3f3f), - width: 45, - child: Column( - children: [ - const SizedBox( - height: 10, - ), - IconMaterialButton( - icon: const Iconify( - EmojioneMonotone.fountain_pen, - color: Color.fromRGBO(255, 255, 255, .85), + color: const Color(0xff252525), + width: 40, + child: Padding( + padding: const EdgeInsets.only(left: 3, right: 3), + child: Column( + children: [ + const SizedBox( + height: 10, ), - color: const Color.fromRGBO(255, 255, 255, .85), - onPressed: () { - setState(() => activepen = Pen.pen); - widget.onPenChange(Pen.pen); - }, - selected: activepen == Pen.pen, - iconSize: 24, - ), - IconMaterialButton( - icon: const Iconify( - Jam.highlighter, - color: Color.fromRGBO(255, 255, 255, .85), + IconMaterialButton( + icon: const Iconify( + EmojioneMonotone.fountain_pen, + size: 20, + color: Color.fromRGBO(255, 255, 255, .85), + ), + color: const Color.fromRGBO(255, 255, 255, .85), + onPressed: () { + setState(() => activepen = Pen.pen); + widget.onPenChange(Pen.pen); + }, + selected: activepen == Pen.pen, + iconSize: 20, ), - color: const Color.fromRGBO(255, 255, 255, .85), - onPressed: () { - setState(() => activepen = Pen.highlighter); - widget.onPenChange(Pen.highlighter); - }, - selected: activepen == Pen.highlighter, - iconSize: 24, - ), - IconMaterialButton( - icon: Transform.translate( - offset: const Offset(-2.0, .0), - child: const AdwaitaIcon(AdwaitaIcons.eraser2), + IconMaterialButton( + icon: const Iconify( + Jam.highlighter, + size: 20, + color: Color.fromRGBO(255, 255, 255, .85), + ), + color: const Color.fromRGBO(255, 255, 255, .85), + onPressed: () { + setState(() => activepen = Pen.highlighter); + widget.onPenChange(Pen.highlighter); + }, + selected: activepen == Pen.highlighter, + iconSize: 20, ), - color: const Color.fromRGBO(255, 255, 255, .85), - onPressed: () { - setState(() => activepen = Pen.eraser); - widget.onPenChange(Pen.eraser); - }, - iconSize: 24, - selected: activepen == Pen.eraser, - ), - IconMaterialButton( - icon: const Icon(FluentIcons.select_object_24_regular), - color: const Color.fromRGBO(255, 255, 255, .85), - onPressed: () { - setState(() => activepen = Pen.selector); - widget.onPenChange(Pen.selector); - }, - selected: activepen == Pen.selector, - iconSize: 24, - ), - ], + IconMaterialButton( + icon: Transform.translate( + offset: const Offset(-2.0, .0), + child: const AdwaitaIcon(AdwaitaIcons.eraser2), + ), + color: const Color.fromRGBO(255, 255, 255, .85), + onPressed: () { + setState(() => activepen = Pen.eraser); + widget.onPenChange(Pen.eraser); + }, + iconSize: 20, + selected: activepen == Pen.eraser, + ), + IconMaterialButton( + icon: const Icon(FluentIcons.select_object_24_regular), + color: const Color.fromRGBO(255, 255, 255, .85), + onPressed: () { + setState(() => activepen = Pen.selector); + widget.onPenChange(Pen.selector); + }, + selected: activepen == Pen.selector, + iconSize: 20, + ), + ], + ), ), ); }