mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 19:36:25 +08:00
Make the MarkdownToolbar prettier
This commit is contained in:
@ -135,7 +135,6 @@ class MarkdownEditorState extends State<MarkdownEditor>
|
|||||||
var settings = Provider.of<Settings>(context);
|
var settings = Provider.of<Settings>(context);
|
||||||
if (settings.experimentalMarkdownToolbar && editingMode) {
|
if (settings.experimentalMarkdownToolbar && editingMode) {
|
||||||
body = Container(
|
body = Container(
|
||||||
height: 600,
|
|
||||||
child: Column(
|
child: Column(
|
||||||
children: <Widget>[
|
children: <Widget>[
|
||||||
Expanded(child: editor),
|
Expanded(child: editor),
|
||||||
|
@ -9,29 +9,36 @@ class MarkdownToolBar extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return Row(
|
return Container(
|
||||||
|
child: Row(
|
||||||
children: [
|
children: [
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Text('H1'),
|
icon: const Text('H1'),
|
||||||
|
padding: const EdgeInsets.all(0.0),
|
||||||
onPressed: () => _modifyCurrentLine('# '),
|
onPressed: () => _modifyCurrentLine('# '),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Text('I'),
|
icon: const Text('I'),
|
||||||
|
padding: const EdgeInsets.all(0.0),
|
||||||
onPressed: () => _modifyCurrentWord('*'),
|
onPressed: () => _modifyCurrentWord('*'),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Text('B'),
|
icon: const Text('B'),
|
||||||
|
padding: const EdgeInsets.all(0.0),
|
||||||
onPressed: () => _modifyCurrentWord('**'),
|
onPressed: () => _modifyCurrentWord('**'),
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.navigate_before),
|
icon: const Icon(Icons.navigate_before),
|
||||||
|
padding: const EdgeInsets.all(0.0),
|
||||||
onPressed: _navigateToPrevWord,
|
onPressed: _navigateToPrevWord,
|
||||||
),
|
),
|
||||||
IconButton(
|
IconButton(
|
||||||
icon: const Icon(Icons.navigate_next),
|
icon: const Icon(Icons.navigate_next),
|
||||||
|
padding: const EdgeInsets.all(0.0),
|
||||||
onPressed: _navigateToNextWord,
|
onPressed: _navigateToNextWord,
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user