Skip to content

Commit

Permalink
feat: enable pencil in production
Browse files Browse the repository at this point in the history
  • Loading branch information
adil192 committed Feb 14, 2024
1 parent 728e4b2 commit 99c5886
Showing 1 changed file with 17 additions and 18 deletions.
35 changes: 17 additions & 18 deletions lib/components/toolbar/toolbar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -337,26 +337,25 @@ class _ToolbarState extends State<Toolbar> {
padding: buttonPadding,
child: FaIcon(Pen.currentPen.icon, size: 16),
),
if (kDebugMode)
ToolbarIconButton(
tooltip: t.editor.pens.pencil,
selected: widget.currentTool == Pencil.currentPencil,
enabled: !widget.readOnly,
onPressed: () {
if (widget.currentTool == Pencil.currentPencil) {
if (toolOptionsType.value == ToolOptions.pencil) {
toolOptionsType.value = ToolOptions.hide;
} else {
toolOptionsType.value = ToolOptions.pencil;
}
} else {
ToolbarIconButton(
tooltip: t.editor.pens.pencil,
selected: widget.currentTool == Pencil.currentPencil,
enabled: !widget.readOnly,
onPressed: () {
if (widget.currentTool == Pencil.currentPencil) {
if (toolOptionsType.value == ToolOptions.pencil) {
toolOptionsType.value = ToolOptions.hide;
widget.setTool(Pencil.currentPencil);
} else {
toolOptionsType.value = ToolOptions.pencil;
}
},
padding: buttonPadding,
child: const FaIcon(Pencil.pencilIcon, size: 16),
),
} else {
toolOptionsType.value = ToolOptions.hide;
widget.setTool(Pencil.currentPencil);
}
},
padding: buttonPadding,
child: const FaIcon(Pencil.pencilIcon, size: 16),
),
ToolbarIconButton(
tooltip: t.editor.pens.highlighter,
selected: widget.currentTool == Highlighter.currentHighlighter,
Expand Down

0 comments on commit 99c5886

Please sign in to comment.