Skip to content

Commit

Permalink
Make Button rendering consistent (fyne-io#4246)
Browse files Browse the repository at this point in the history
Changed the default rendering of Button so that the animation background rectangle starts off with the same rendering as it has after the button has been clicked
  • Loading branch information
pbrown12303 authored and andydotxyz committed Nov 17, 2023
1 parent d6661c6 commit 4ff741f
Show file tree
Hide file tree
Showing 145 changed files with 177 additions and 172 deletions.
2 changes: 1 addition & 1 deletion container/testdata/apptabs/desktop/hover_overflow.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</container>
<widget pos="114,0" size="36x36" type="*widget.Button">
<rectangle fillColor="rgba(62,78,78,255)" radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/apptabs/desktop/tab_location_bottom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</container>
<widget pos="52,0" size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</container>
<widget pos="0,35" size="48x36" type="*widget.Button">
<rectangle radius="4" size="48x36"/>
<rectangle size="0x0"/>
<rectangle size="48x36"/>
<image fillMode="contain" pos="14,8" rsc="more-vertical.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/apptabs/desktop/tab_location_top.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</container>
<widget pos="52,0" size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</container>
<widget pos="0,35" size="48x36" type="*widget.Button">
<rectangle radius="4" size="48x36"/>
<rectangle size="0x0"/>
<rectangle size="48x36"/>
<image fillMode="contain" pos="14,8" rsc="more-vertical.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</container>
<widget pos="164,0" size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle fillColor="rgba(0,0,0,0)" size="36x36"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/apptabs/mobile/tab_location_bottom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</container>
<widget pos="48,0" size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/apptabs/mobile/tab_location_top.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</container>
<widget pos="48,0" size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/doctabs/desktop/change_icon_initial.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<container pos="464,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/doctabs/desktop/dynamic_appended.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<container pos="264,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<container pos="264,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<container pos="264,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/doctabs/desktop/dynamic_initial.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<container pos="264,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<container pos="264,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
4 changes: 2 additions & 2 deletions container/testdata/doctabs/desktop/hover_all_tabs.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<container pos="74,0" size="76x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="contentAddIcon" size="iconInlineSize"/>
</widget>
<widget pos="40,0" size="36x36" type="*widget.Button">
<rectangle fillColor="rgba(62,78,78,255)" radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
4 changes: 2 additions & 2 deletions container/testdata/doctabs/desktop/hover_create_tab.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<container pos="74,0" size="76x36">
<widget size="36x36" type="*widget.Button">
<rectangle fillColor="rgba(62,78,78,255)" radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="contentAddIcon" size="iconInlineSize"/>
</widget>
<widget pos="40,0" size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
4 changes: 2 additions & 2 deletions container/testdata/doctabs/desktop/hover_first.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@
<container pos="74,0" size="76x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="contentAddIcon" size="iconInlineSize"/>
</widget>
<widget pos="40,0" size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
4 changes: 2 additions & 2 deletions container/testdata/doctabs/desktop/hover_first_close.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<container pos="74,0" size="76x36">
<widget size="36x36" type="*widget.Button">
<rectangle fillColor="rgba(62,78,78,255)" radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="contentAddIcon" size="iconInlineSize"/>
</widget>
<widget pos="40,0" size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
4 changes: 2 additions & 2 deletions container/testdata/doctabs/desktop/hover_none.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<container pos="74,0" size="76x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="contentAddIcon" size="iconInlineSize"/>
</widget>
<widget pos="40,0" size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
4 changes: 2 additions & 2 deletions container/testdata/doctabs/desktop/hover_second.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
<container pos="74,0" size="76x36">
<widget size="36x36" type="*widget.Button">
<rectangle fillColor="rgba(62,78,78,255)" radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="contentAddIcon" size="iconInlineSize"/>
</widget>
<widget pos="40,0" size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/doctabs/desktop/layout_bottom_icon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/doctabs/desktop/layout_bottom_text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/doctabs/desktop/layout_leading_icon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<container pos="0,114" size="72x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-vertical.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<container pos="0,114" size="72x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-vertical.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/doctabs/desktop/layout_leading_text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<container pos="0,114" size="72x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-vertical.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/doctabs/desktop/layout_top_icon.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
2 changes: 1 addition & 1 deletion container/testdata/doctabs/desktop/layout_top_text.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<container pos="114,0" size="36x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-horizontal.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<container pos="0,114" size="72x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-vertical.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<container pos="0,114" size="72x36">
<widget size="36x36" type="*widget.Button">
<rectangle radius="4" size="36x36"/>
<rectangle size="0x0"/>
<rectangle size="36x36"/>
<image fillMode="contain" pos="8,8" rsc="more-vertical.svg" size="iconInlineSize" themed="default"/>
</widget>
</container>
Expand Down
Loading

0 comments on commit 4ff741f

Please sign in to comment.