Skip to content

Commit

Permalink
fix css bug
Browse files Browse the repository at this point in the history
  • Loading branch information
DylanXie123 committed Dec 14, 2019
1 parent b47641c commit a554047
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 39 deletions.
Binary file modified assets/fonts/Keyboard-Icon.ttf
Binary file not shown.
22 changes: 22 additions & 0 deletions assets/html/mathquill.css
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,28 @@
.mq-math-mode .mq-font {
font: 1em "Times New Roman", serif;
}
.mq-math-mode .mq-supsub {
text-align: left;
font-size: 90%;
vertical-align: -0.5em;
}
.mq-math-mode .mq-supsub.mq-sup-only {
vertical-align: .5em;
}
.mq-math-mode .mq-supsub.mq-sup-only .mq-sup {
display: inline-block;
vertical-align: text-bottom;
}
.mq-math-mode .mq-supsub .mq-sup {
display: block;
}
.mq-math-mode .mq-supsub .mq-sub {
display: block;
float: left;
}
.mq-math-mode .mq-supsub .mq-binary-operator {
padding: 0 .1em;
}
.mq-math-mode .mq-supsub .mq-fraction {
font-size: 70%;
}
Expand Down
79 changes: 41 additions & 38 deletions lib/src/widgets/keyboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -194,47 +194,50 @@ class _ExpandKeyBoardState extends State<ExpandKeyBoard> with TickerProviderStat
}

Widget _buildAnimation(BuildContext context, Widget child) {
return Container(
margin: EdgeInsets.symmetric(horizontal: 5.0),
decoration: BoxDecoration(
borderRadius: BorderRadius.only(topRight: Radius.circular(20.0),topLeft: Radius.circular(20.0)),
return Padding(
padding: EdgeInsets.symmetric(horizontal: 5.0),
child: Material(
color: Colors.blueAccent[400],
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
SizedBox(
height: arrowAnimation.value,
width: double.infinity,
child: FlatButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onPressed: () {
final setting = Provider.of<SettingModel>(context, listen: false);
if (animationController.status == AnimationStatus.dismissed) {
animationController.forward();
setting.changeKeyboardMode(true);
} else {
animationController.reverse();
setting.changeKeyboardMode(false);
}
},
child: Icon(
(keyboardAnimation.value > _height*0.8)?Icons.keyboard_arrow_down:Icons.keyboard_arrow_up,
color: Colors.grey[200],
borderRadius: BorderRadius.only(
topRight: Radius.circular(20.0),
topLeft: Radius.circular(20.0),
),
child: Column(
mainAxisSize: MainAxisSize.min,
children: <Widget>[
SizedBox(
height: arrowAnimation.value,
width: double.infinity,
child: FlatButton(
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onPressed: () {
final setting = Provider.of<SettingModel>(context, listen: false);
if (animationController.status == AnimationStatus.dismissed) {
animationController.forward();
setting.changeKeyboardMode(true);
} else {
animationController.reverse();
setting.changeKeyboardMode(false);
}
},
child: Icon(
(keyboardAnimation.value > _height*0.8)?Icons.keyboard_arrow_down:Icons.keyboard_arrow_up,
color: Colors.grey[200],
),
),
),
),
SizedBox(
height: keyboardAnimation.value,
child: GridView.count(
physics: NeverScrollableScrollPhysics(),
crossAxisCount: 7,
children: _buildUpButton(),
childAspectRatio: AspectRatio,
SizedBox(
height: keyboardAnimation.value,
child: GridView.count(
physics: NeverScrollableScrollPhysics(),
crossAxisCount: 7,
children: _buildUpButton(),
childAspectRatio: AspectRatio,
),
),
),
],
],
),
),
);
}
Expand Down Expand Up @@ -475,7 +478,7 @@ class _ExpandKeyBoardState extends State<ExpandKeyBoard> with TickerProviderStat

button.add(MyButton(
child: Icon(// expo
IconData(0xe905, fontFamily: 'Keyboard'),
IconData(0xe906, fontFamily: 'Keyboard'),
color: fontColor,
size: iconSize,
),
Expand Down
1 change: 1 addition & 0 deletions lib/src/widgets/result.dart
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ class _ResultState extends State<Result> with TickerProviderStateMixin {
height: animation.value,
width: double.infinity,
alignment: Alignment.centerRight,
padding: EdgeInsets.symmetric(horizontal: 10.0, vertical: 2.0),
child: Consumer<MathModel>(
builder: (_, model, __) {
String text;
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ description: A scientific & intutive calculator written in Flutter.
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.3.4+2
version: 1.3.5+3

environment:
sdk: ">=2.5.0 <3.0.0"
Expand Down

0 comments on commit a554047

Please sign in to comment.