mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-06-30 11:33:34 +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);
|
||||
if (settings.experimentalMarkdownToolbar && editingMode) {
|
||||
body = Container(
|
||||
height: 600,
|
||||
child: Column(
|
||||
children: <Widget>[
|
||||
Expanded(child: editor),
|
||||
|
@ -9,29 +9,36 @@ class MarkdownToolBar extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Row(
|
||||
children: [
|
||||
IconButton(
|
||||
icon: const Text('H1'),
|
||||
onPressed: () => _modifyCurrentLine('# '),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Text('I'),
|
||||
onPressed: () => _modifyCurrentWord('*'),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Text('B'),
|
||||
onPressed: () => _modifyCurrentWord('**'),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.navigate_before),
|
||||
onPressed: _navigateToPrevWord,
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.navigate_next),
|
||||
onPressed: _navigateToNextWord,
|
||||
),
|
||||
],
|
||||
return Container(
|
||||
child: Row(
|
||||
children: [
|
||||
IconButton(
|
||||
icon: const Text('H1'),
|
||||
padding: const EdgeInsets.all(0.0),
|
||||
onPressed: () => _modifyCurrentLine('# '),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Text('I'),
|
||||
padding: const EdgeInsets.all(0.0),
|
||||
onPressed: () => _modifyCurrentWord('*'),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Text('B'),
|
||||
padding: const EdgeInsets.all(0.0),
|
||||
onPressed: () => _modifyCurrentWord('**'),
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.navigate_before),
|
||||
padding: const EdgeInsets.all(0.0),
|
||||
onPressed: _navigateToPrevWord,
|
||||
),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.navigate_next),
|
||||
padding: const EdgeInsets.all(0.0),
|
||||
onPressed: _navigateToNextWord,
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user