mirror of
https://github.com/go-vikunja/app
synced 2024-11-11 15:28:09 +00:00
Add dark mode (#46)
Merge branch 'master' into feature/dark-mode Add white logo in dark mode Make button shadow dark Format Add dark mode Co-authored-by: kolaente <k@knt.li> Co-authored-by: Jonas Franz <info@jonasfranz.software> Reviewed-on: vikunja/app#46 Reviewed-by: konrad <konrad@kola-entertainments.de>
This commit is contained in:
parent
84ab307e5f
commit
826acc26f8
Binary file not shown.
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 56 KiB |
BIN
assets/vikunja_logo_full_white.png
Normal file
BIN
assets/vikunja_logo_full_white.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 51 KiB |
@ -61,6 +61,7 @@ class VikunjaApp extends StatelessWidget {
|
||||
return new MaterialApp(
|
||||
title: 'Vikunja',
|
||||
theme: buildVikunjaTheme(),
|
||||
darkTheme: buildVikunjaDarkTheme(),
|
||||
home: this.home,
|
||||
);
|
||||
}
|
||||
|
@ -34,7 +34,9 @@ class _LoginPageState extends State<LoginPage> {
|
||||
Padding(
|
||||
padding: EdgeInsets.symmetric(vertical: 30),
|
||||
child: Image(
|
||||
image: AssetImage('assets/vikunja_logo_full.png'),
|
||||
image: Theme.of(context).brightness == Brightness.dark
|
||||
? AssetImage('assets/vikunja_logo_full_white.png')
|
||||
: AssetImage('assets/vikunja_logo_full.png'),
|
||||
height: 85.0,
|
||||
semanticLabel: 'Vikunja Logo',
|
||||
),
|
||||
|
@ -24,7 +24,9 @@ class FancyButton extends StatelessWidget {
|
||||
height: height,
|
||||
decoration: BoxDecoration(boxShadow: [
|
||||
BoxShadow(
|
||||
color: vButtonShadow,
|
||||
color: Theme.of(context).brightness == Brightness.dark
|
||||
? vButtonShadowDark
|
||||
: vButtonShadow,
|
||||
offset: Offset(-5, 5),
|
||||
blurRadius: 10,
|
||||
),
|
||||
|
@ -15,6 +15,7 @@ const vGreen = Color(0xFF00CE6E);
|
||||
|
||||
const vButtonColor = vPrimary;
|
||||
const vButtonTextColor = vWhite;
|
||||
const vButtonShadowDark = Color(0xFF0b2a4a);
|
||||
const vButtonShadow = Color(0xFFb2d9ff);
|
||||
|
||||
///////////
|
||||
|
@ -1,8 +1,16 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:vikunja_app/theme/constants.dart';
|
||||
|
||||
ThemeData buildVikunjaTheme() {
|
||||
var base = ThemeData.light();
|
||||
ThemeData buildVikunjaTheme() => _buildVikunjaTheme(ThemeData.light());
|
||||
|
||||
ThemeData buildVikunjaDarkTheme() {
|
||||
ThemeData base = _buildVikunjaTheme(ThemeData.dark());
|
||||
return base.copyWith(
|
||||
accentColor: vWhite,
|
||||
);
|
||||
}
|
||||
|
||||
ThemeData _buildVikunjaTheme(ThemeData base) {
|
||||
return base.copyWith(
|
||||
errorColor: vRed,
|
||||
primaryColor: vPrimaryDark,
|
||||
|
@ -34,6 +34,7 @@ flutter:
|
||||
- assets/graphics/hypnotize.png
|
||||
- assets/vikunja_logo.png
|
||||
- assets/vikunja_logo_full.png
|
||||
- assets/vikunja_logo_full_white.png
|
||||
fonts:
|
||||
- family: Quicksand
|
||||
fonts:
|
||||
|
Loading…
Reference in New Issue
Block a user