File tree Expand file tree Collapse file tree 3 files changed +11
-12
lines changed
java/com/ichi2/anki/ui/windows/reviewer/whiteboard Expand file tree Collapse file tree 3 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -202,17 +202,6 @@ class WhiteboardFragment :
202202 configureBrushButton(buttonVertical, brush, index)
203203 binding.brushToolbarContainerVertical.addView(buttonVertical)
204204 }
205-
206- fun addBrushButton () =
207- MaterialButton (requireContext(), null , com.google.android.material.R .attr.materialIconButtonStyle).apply {
208- setIconResource(R .drawable.ic_add)
209- setTooltipTextCompat(getString(R .string.add_brush))
210- val color = ThemeUtils .getThemeAttrColor(requireContext(), androidx.appcompat.R .attr.colorControlNormal)
211- iconTint = ColorStateList .valueOf(color)
212- setOnClickListener { showAddColorDialog() }
213- }
214- binding.brushToolbarContainerHorizontal.addView(addBrushButton())
215- binding.brushToolbarContainerVertical.addView(addBrushButton())
216205 }
217206
218207 /* *
@@ -507,6 +496,7 @@ class WhiteboardFragment :
507496 override fun onMenuItemClick (item : MenuItem ): Boolean {
508497 Timber .i(" WhiteboardFragment::onMenuItemClick %s" , item.title)
509498 when (item.itemId) {
499+ R .id.action_add_brush -> showAddColorDialog()
510500 R .id.action_toggle_stylus -> {
511501 item.isChecked = ! item.isChecked
512502 viewModel.toggleStylusOnlyMode()
Original file line number Diff line number Diff line change 8787
8888 <FrameLayout
8989 android : layout_width =" wrap_content"
90- android : layout_height =" wrap_content" >
90+ android : layout_height =" wrap_content"
91+ >
9192
9293 <HorizontalScrollView
9394 android : id =" @+id/brush_scroll_view_horizontal"
9495 android : layout_width =" wrap_content"
9596 android : layout_height =" wrap_content"
97+ android : paddingEnd =" 4dp"
9698 android : scrollbars =" none" >
9799
98100 <LinearLayout
109111 android : layout_width =" wrap_content"
110112 android : layout_height =" wrap_content"
111113 android : visibility =" gone"
114+ android : paddingBottom =" 4dp"
112115 android : scrollbars =" none" >
113116
114117 <LinearLayout
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<menu xmlns : android =" http://schemas.android.com/apk/res/android"
33 xmlns : app =" http://schemas.android.com/apk/res-auto" >
4+ <item
5+ android : id =" @+id/action_add_brush"
6+ android : title =" @string/add_brush"
7+ android : icon =" @drawable/ic_add"
8+ app : showAsAction =" never"
9+ />
410 <item
511 android : id =" @+id/action_toggle_stylus"
612 android : title =" @string/stylus_mode"
You can’t perform that action at this time.
0 commit comments