Skip to content

Commit a554047

Browse files
committed
fix css bug
1 parent b47641c commit a554047

File tree

5 files changed

+65
-39
lines changed

5 files changed

+65
-39
lines changed

assets/fonts/Keyboard-Icon.ttf

-4 Bytes
Binary file not shown.

assets/html/mathquill.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,28 @@
9494
.mq-math-mode .mq-font {
9595
font: 1em "Times New Roman", serif;
9696
}
97+
.mq-math-mode .mq-supsub {
98+
text-align: left;
99+
font-size: 90%;
100+
vertical-align: -0.5em;
101+
}
102+
.mq-math-mode .mq-supsub.mq-sup-only {
103+
vertical-align: .5em;
104+
}
105+
.mq-math-mode .mq-supsub.mq-sup-only .mq-sup {
106+
display: inline-block;
107+
vertical-align: text-bottom;
108+
}
109+
.mq-math-mode .mq-supsub .mq-sup {
110+
display: block;
111+
}
112+
.mq-math-mode .mq-supsub .mq-sub {
113+
display: block;
114+
float: left;
115+
}
116+
.mq-math-mode .mq-supsub .mq-binary-operator {
117+
padding: 0 .1em;
118+
}
97119
.mq-math-mode .mq-supsub .mq-fraction {
98120
font-size: 70%;
99121
}

lib/src/widgets/keyboard.dart

Lines changed: 41 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -194,47 +194,50 @@ class _ExpandKeyBoardState extends State<ExpandKeyBoard> with TickerProviderStat
194194
}
195195

196196
Widget _buildAnimation(BuildContext context, Widget child) {
197-
return Container(
198-
margin: EdgeInsets.symmetric(horizontal: 5.0),
199-
decoration: BoxDecoration(
200-
borderRadius: BorderRadius.only(topRight: Radius.circular(20.0),topLeft: Radius.circular(20.0)),
197+
return Padding(
198+
padding: EdgeInsets.symmetric(horizontal: 5.0),
199+
child: Material(
201200
color: Colors.blueAccent[400],
202-
),
203-
child: Column(
204-
mainAxisSize: MainAxisSize.min,
205-
children: <Widget>[
206-
SizedBox(
207-
height: arrowAnimation.value,
208-
width: double.infinity,
209-
child: FlatButton(
210-
splashColor: Colors.transparent,
211-
highlightColor: Colors.transparent,
212-
onPressed: () {
213-
final setting = Provider.of<SettingModel>(context, listen: false);
214-
if (animationController.status == AnimationStatus.dismissed) {
215-
animationController.forward();
216-
setting.changeKeyboardMode(true);
217-
} else {
218-
animationController.reverse();
219-
setting.changeKeyboardMode(false);
220-
}
221-
},
222-
child: Icon(
223-
(keyboardAnimation.value > _height*0.8)?Icons.keyboard_arrow_down:Icons.keyboard_arrow_up,
224-
color: Colors.grey[200],
201+
borderRadius: BorderRadius.only(
202+
topRight: Radius.circular(20.0),
203+
topLeft: Radius.circular(20.0),
204+
),
205+
child: Column(
206+
mainAxisSize: MainAxisSize.min,
207+
children: <Widget>[
208+
SizedBox(
209+
height: arrowAnimation.value,
210+
width: double.infinity,
211+
child: FlatButton(
212+
splashColor: Colors.transparent,
213+
highlightColor: Colors.transparent,
214+
onPressed: () {
215+
final setting = Provider.of<SettingModel>(context, listen: false);
216+
if (animationController.status == AnimationStatus.dismissed) {
217+
animationController.forward();
218+
setting.changeKeyboardMode(true);
219+
} else {
220+
animationController.reverse();
221+
setting.changeKeyboardMode(false);
222+
}
223+
},
224+
child: Icon(
225+
(keyboardAnimation.value > _height*0.8)?Icons.keyboard_arrow_down:Icons.keyboard_arrow_up,
226+
color: Colors.grey[200],
227+
),
225228
),
226229
),
227-
),
228-
SizedBox(
229-
height: keyboardAnimation.value,
230-
child: GridView.count(
231-
physics: NeverScrollableScrollPhysics(),
232-
crossAxisCount: 7,
233-
children: _buildUpButton(),
234-
childAspectRatio: AspectRatio,
230+
SizedBox(
231+
height: keyboardAnimation.value,
232+
child: GridView.count(
233+
physics: NeverScrollableScrollPhysics(),
234+
crossAxisCount: 7,
235+
children: _buildUpButton(),
236+
childAspectRatio: AspectRatio,
237+
),
235238
),
236-
),
237-
],
239+
],
240+
),
238241
),
239242
);
240243
}
@@ -475,7 +478,7 @@ class _ExpandKeyBoardState extends State<ExpandKeyBoard> with TickerProviderStat
475478

476479
button.add(MyButton(
477480
child: Icon(// expo
478-
IconData(0xe905, fontFamily: 'Keyboard'),
481+
IconData(0xe906, fontFamily: 'Keyboard'),
479482
color: fontColor,
480483
size: iconSize,
481484
),

lib/src/widgets/result.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class _ResultState extends State<Result> with TickerProviderStateMixin {
3434
height: animation.value,
3535
width: double.infinity,
3636
alignment: Alignment.centerRight,
37+
padding: EdgeInsets.symmetric(horizontal: 10.0, vertical: 2.0),
3738
child: Consumer<MathModel>(
3839
builder: (_, model, __) {
3940
String text;

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ description: A scientific & intutive calculator written in Flutter.
1111
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
1212
# Read more about iOS versioning at
1313
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14-
version: 1.3.4+2
14+
version: 1.3.5+3
1515

1616
environment:
1717
sdk: ">=2.5.0 <3.0.0"

0 commit comments

Comments
 (0)