feat: text and background color in mobile toolbar (#233)
* refactor: move shared code out of desktop * refactor: fix double exist error and extract color option * feat: update color icon * refactor: refactor MobileToolbarItemMenuBtn to be more flexiable * feat: add textAndBackgroundColorMobileToolbarItem * chore: dart fix * refactor: extract MobileToolbarMenuGridDelegate * chore: update UI parameters * refactor: delete format color in format_rich_text_style.dart and refactor the code * chore: remove the bottom line of tabbar * refactor: set color opitions to be customizable * chore: add scrollbar in opitions grid view * test: update code to pass the previous tests * chore: add Material in testing * chore: unify text and background default color opitions * test: add textAndBackgroundColorMobileToolbarItem test * chore: update AppFlowyEditorLocalizations * chore: replace string by components' key in tests * test: add color options widgets tests * chore: dart fix * chore: dart format
This commit is contained in:
parent
2ea98f1491
commit
09fd4c8d56
2 changed files with 1416 additions and 304 deletions
3
assets/mobile/toolbar_icons/color.svg
Normal file
3
assets/mobile/toolbar_icons/color.svg
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M11.999 1.95312C6.47602 1.95312 1.99902 6.43012 1.99902 11.9531C1.99902 17.4761 6.47602 21.9531 11.999 21.9531C12.08 21.9531 12.695 21.9661 12.905 21.9531C13.185 21.9351 13.437 21.8911 13.718 21.8281C15.05 21.5281 15.941 20.6311 16.187 19.4221C16.279 18.9641 16.23 18.6641 16.093 17.8281C16.037 17.4871 16.009 17.3241 15.999 17.1411C15.977 16.7211 16.064 16.4761 16.28 16.2651C16.472 16.0791 16.651 15.9791 16.874 15.9531C17.105 15.9261 17.341 15.9771 17.843 16.0781C18.473 16.2051 18.683 16.2131 19.03 16.2031C20.516 16.1611 21.705 15.0451 21.905 13.5151C21.975 12.9841 21.999 12.4771 21.999 11.9531C21.999 6.43012 17.522 1.95312 11.999 1.95312ZM11.999 3.95312C16.417 3.95312 19.999 7.53511 19.999 11.9531C19.999 12.3881 19.964 12.8181 19.905 13.2651C19.83 13.8431 19.447 14.1891 18.968 14.2031C18.835 14.2071 18.708 14.2021 18.249 14.1091C17.549 13.9681 17.159 13.9251 16.655 13.9841C16.001 14.0611 15.387 14.3281 14.874 14.8281C14.196 15.4881 13.98 16.2861 14.03 17.2341C14.045 17.5131 14.056 17.7611 14.124 18.1721C14.216 18.7281 14.242 18.8981 14.218 19.0151C14.129 19.4531 13.844 19.7321 13.28 19.8591C13.106 19.8991 12.957 19.9421 12.78 19.9531C12.629 19.9631 12.489 19.9541 12.155 19.9531C12.075 19.9531 12.084 19.9531 11.999 19.9531C7.58102 19.9531 3.99902 16.3711 3.99902 11.9531C3.99902 7.53511 7.58102 3.95312 11.999 3.95312ZM12.999 6.07812C12.171 6.07812 11.499 6.75012 11.499 7.57811C11.499 8.40611 12.171 9.07811 12.999 9.07811C13.827 9.07811 14.499 8.40611 14.499 7.57811C14.499 6.75012 13.827 6.07812 12.999 6.07812ZM8.81104 7.26513C7.98304 7.26613 7.31104 7.93712 7.31104 8.76512C7.31104 9.59412 7.98304 10.2651 8.81104 10.2651C9.64004 10.2651 10.311 9.59412 10.311 8.76512C10.312 7.93712 9.64004 7.26513 8.81104 7.26513ZM16.218 8.98412C15.389 8.98412 14.718 9.65612 14.718 10.4841C14.718 11.3131 15.389 11.9841 16.218 11.9841C17.046 11.9841 17.718 11.3131 17.718 10.4841C17.718 9.65612 17.046 8.98412 16.218 8.98412ZM7.59302 11.4221C6.76402 11.4221 6.09302 12.0931 6.09302 12.9221C6.09302 13.7501 6.76402 14.4221 7.59302 14.4221C8.42102 14.4221 9.09302 13.7501 9.09302 12.9221C9.09302 12.0931 8.42102 11.4221 7.59302 11.4221ZM10.499 14.6721C9.67102 14.6721 8.99902 15.3431 8.99902 16.1721C8.99902 17.0001 9.67102 17.6721 10.499 17.6721C11.327 17.6721 11.999 17.0001 11.999 16.1721C11.999 15.3431 11.327 14.6721 10.499 14.6721Z" fill="#2F3030"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.4 KiB |
|
|
@ -1,3 +0,0 @@
|
|||
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M17.0128 1.95312C16.641 1.95312 16.4226 2.1421 16.2757 2.2901L14.553 4.00311L13.699 3.25214C13.2282 2.78114 12.6075 2.54614 11.9904 2.54614C11.3733 2.54614 10.7227 2.8191 10.2518 3.2901L5.29412 8.2431C4.90412 8.6331 4.92082 9.27315 5.31092 9.66315C5.70092 10.0541 6.35262 10.0371 6.74272 9.64612L11.6855 4.69611C11.847 4.53411 12.0989 4.46214 12.295 4.66614L13.1261 5.4201L7.25543 11.2901C6.26343 12.2831 5.35122 13.6211 4.47752 15.1961C3.80882 16.4011 3.19013 17.6921 2.66722 18.9771C2.48442 19.4261 1.99902 20.7261 1.99902 20.9651C1.99902 21.2031 2.07752 21.4261 2.23032 21.6021C2.24542 21.6191 2.54022 21.9441 3.00042 21.9531L16.9624 21.9451C17.514 21.9451 17.9612 21.4981 17.9612 20.9451C17.9612 20.3931 17.514 19.9451 16.9624 19.9451L7.91592 19.9471C8.22302 19.7911 8.53502 19.6261 8.83302 19.4601C10.4056 18.5861 11.6906 17.6831 12.6811 16.6911L19.1785 10.2271L21.6755 7.69611C21.8173 7.55211 21.9973 7.40112 21.9978 6.94812C22.0002 4.97112 21.1934 3.76214 20.7013 3.25714C20.2092 2.75314 19.0105 1.95513 17.0128 1.95312ZM17.3793 3.99414C17.798 3.98114 18.8293 4.22309 19.2764 4.64709C19.7235 5.07209 19.9808 6.1751 19.9665 6.5921L18.7134 7.84412L16.0282 5.36511L17.3793 3.99414ZM14.602 6.7901L17.3113 9.24414L11.2506 15.2891C10.4095 16.1311 9.25383 16.9371 7.83003 17.7291C6.87103 18.2621 5.79322 18.7631 4.76182 19.2031C5.20072 18.1701 5.69282 17.1241 6.22542 16.1641C7.01642 14.7391 7.85862 13.5511 8.69912 12.7091L14.602 6.7901Z" fill="#2F3030"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
Loading…
Reference in a new issue