Merge pull request #298 from ente-io/dialog_redesign

Dialog redesign
This commit is contained in:
Manav 2022-06-11 13:06:36 +05:30 committed by GitHub
commit e83cd6b1e5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 61 additions and 60 deletions

View file

@ -115,15 +115,20 @@ final darkThemeData = ThemeData(
),
cardColor: Color.fromRGBO(10, 15, 15, 1.0),
dialogTheme: DialogTheme().copyWith(
backgroundColor: Color.fromRGBO(10, 15, 15, 1.0),
titleTextStyle: TextStyle(
color: Colors.white, fontSize: 24, fontWeight: FontWeight.w600),
contentTextStyle: TextStyle(
fontFamily: 'Inter-Medium',
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w500),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8))),
backgroundColor: Color.fromRGBO(15, 15, 15, 1.0),
titleTextStyle: TextStyle(
color: Colors.white,
fontSize: 24,
fontWeight: FontWeight.w600,
),
contentTextStyle: TextStyle(
fontFamily: 'Inter-Medium',
color: Colors.white,
fontSize: 16,
fontWeight: FontWeight.w500,
),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
),
inputDecorationTheme: InputDecorationTheme().copyWith(
focusedBorder: UnderlineInputBorder(
borderSide: BorderSide(
@ -155,46 +160,51 @@ final darkThemeData = ThemeData(
TextTheme _buildTextTheme(Color textColor) {
return TextTheme().copyWith(
headline4: TextStyle(
color: textColor,
fontSize: 32,
fontWeight: FontWeight.w600,
fontFamily: 'Inter',
),
headline5: TextStyle(
color: textColor,
fontSize: 24,
fontWeight: FontWeight.w600,
fontFamily: 'Inter',
),
headline6: TextStyle(
color: textColor,
fontSize: 18,
fontFamily: 'Inter',
fontWeight: FontWeight.w600),
subtitle1: TextStyle(
color: textColor,
fontFamily: 'Inter',
fontSize: 16,
fontWeight: FontWeight.w500),
subtitle2: TextStyle(
color: textColor,
fontFamily: 'Inter',
fontSize: 14,
fontWeight: FontWeight.w500),
bodyText1: TextStyle(
fontFamily: 'Inter',
color: textColor,
fontSize: 16,
fontWeight: FontWeight.w400),
caption: TextStyle(
color: textColor.withOpacity(0.6),
fontSize: 14,
),
overline: TextStyle(
color: textColor.withOpacity(0.8),
fontSize: 12,
));
headline4: TextStyle(
color: textColor,
fontSize: 32,
fontWeight: FontWeight.w600,
fontFamily: 'Inter',
),
headline5: TextStyle(
color: textColor,
fontSize: 24,
fontWeight: FontWeight.w600,
fontFamily: 'Inter',
),
headline6: TextStyle(
color: textColor,
fontSize: 18,
fontFamily: 'Inter',
fontWeight: FontWeight.w600,
),
subtitle1: TextStyle(
color: textColor,
fontFamily: 'Inter',
fontSize: 16,
fontWeight: FontWeight.w500,
),
subtitle2: TextStyle(
color: textColor,
fontFamily: 'Inter',
fontSize: 14,
fontWeight: FontWeight.w500,
),
bodyText1: TextStyle(
fontFamily: 'Inter',
color: textColor,
fontSize: 16,
fontWeight: FontWeight.w400,
),
caption: TextStyle(
color: textColor.withOpacity(0.6),
fontSize: 14,
),
overline: TextStyle(
color: textColor.withOpacity(0.8),
fontSize: 12,
),
);
}
class EnteApp extends StatefulWidget {

View file

@ -1,9 +1,7 @@
import 'dart:io';
import 'dart:ui';
import 'package:flutter/material.dart';
import 'package:photo_manager/photo_manager.dart';
// import 'package:photos/ente_theme_data.dart';
import 'package:photos/services/sync_service.dart';
class GrantPermissionsWidget extends StatelessWidget {
@ -108,10 +106,7 @@ class GrantPermissionsWidget extends StatelessWidget {
showDialog(
context: context,
builder: (BuildContext context) {
return BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
child: alert,
);
return alert;
},
barrierColor: Colors.black12,
);

View file

@ -1,5 +1,4 @@
import 'dart:math';
import 'dart:ui';
import 'package:confetti/confetti.dart';
import 'package:flutter/material.dart';
@ -50,10 +49,7 @@ Future<dynamic> showErrorDialog(
return showDialog(
context: context,
builder: (BuildContext context) {
return BackdropFilter(
filter: ImageFilter.blur(sigmaX: 5, sigmaY: 5),
child: alert,
);
return alert;
},
barrierColor: Colors.black12,
);