Skip to content

Commit

Permalink
UI: Bottom Download Menu: UI adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Artx-II committed Jun 18, 2020
1 parent eb9bc35 commit be92c51
Showing 1 changed file with 16 additions and 22 deletions.
38 changes: 16 additions & 22 deletions lib/ui/bottom_download_menu.dart
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,6 @@ class _CustomDownloadMenuState extends State<CustomDownloadMenu> with TickerProv
double menuSize = 160;
int subMenu;

// Menu Border Colors
Color audioTabBorderColor = Colors.black12;
Color videoTabBorderColor = Colors.black12;

String volumeString(double value) {
if (value == 1) {
return "Default";
Expand All @@ -48,20 +44,6 @@ class _CustomDownloadMenuState extends State<CustomDownloadMenu> with TickerProv
}
}

void animateAudioTabBorderColor() async {
setState(() => audioTabBorderColor = Colors.redAccent);
Future.delayed(Duration(milliseconds: 60), () {
setState(() => audioTabBorderColor = Colors.black12);
});
}

void animateVideoTabBorderColor() async {
setState(() => videoTabBorderColor = Colors.redAccent);
Future.delayed(Duration(milliseconds: 60), () {
setState(() => videoTabBorderColor = Colors.black12);
});
}

void initState() {
volumeStream.add(1);
bassGainStream.add(0);
Expand Down Expand Up @@ -158,7 +140,6 @@ class _CustomDownloadMenuState extends State<CustomDownloadMenu> with TickerProv
Expanded(
child: GestureDetector(
onTap: () {
animateAudioTabBorderColor();
setState(() {
menuSize = MediaQuery.of(context).size.height*0.55;
subMenu = 2;
Expand All @@ -174,7 +155,14 @@ class _CustomDownloadMenuState extends State<CustomDownloadMenu> with TickerProv
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Theme.of(context).cardColor,
border: Border.all(color: audioTabBorderColor, width: 2)
boxShadow: [
BoxShadow(
color: Colors.black12.withOpacity(0.05),
offset: Offset(0, 3), //(x,y)
blurRadius: 6.0,
spreadRadius: 0.01
)
]
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
Expand Down Expand Up @@ -208,7 +196,6 @@ class _CustomDownloadMenuState extends State<CustomDownloadMenu> with TickerProv
Expanded(
child: GestureDetector(
onTap: () {
animateVideoTabBorderColor();
setState(() {
menuSize = MediaQuery.of(context).size.height*0.55;
subMenu = 2;
Expand All @@ -224,7 +211,14 @@ class _CustomDownloadMenuState extends State<CustomDownloadMenu> with TickerProv
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(20),
color: Theme.of(context).cardColor,
border: Border.all(color: videoTabBorderColor, width: 2)
boxShadow: [
BoxShadow(
color: Colors.black12.withOpacity(0.05),
offset: Offset(0, 3), //(x,y)
blurRadius: 6.0,
spreadRadius: 0.01
)
]
),
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
Expand Down

0 comments on commit be92c51

Please sign in to comment.