Skip to content

Commit

Permalink
Reduce the size used by the header and footer on screens
Browse files Browse the repository at this point in the history
* Instead of having 30 pixels on the header (the screen's title and sometimes a button) and the footer (bottom buttons and the back button)
* Change the back button's label from `Back` to an arrow icon, and change `Configs` to a wrench icon
  • Loading branch information
Zailer43 committed Jul 13, 2024
1 parent 71e6778 commit 8bd33c4
Show file tree
Hide file tree
Showing 13 changed files with 268 additions and 190 deletions.
2 changes: 2 additions & 0 deletions src/main/resources/assets/fzmm/lang/en_us.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"fzmm.gui.button.arrow2.left": "",
"fzmm.gui.button.arrow2.right": "",
"fzmm.gui.button.back": "Back",
"fzmm.gui.button.back.icon": "",
"fzmm.gui.button.cancel": "Cancel",
"fzmm.gui.button.colorList.add": "Add color",
"fzmm.gui.button.colorList.amount": "There are %s colors",
Expand Down Expand Up @@ -396,6 +397,7 @@
"fzmm.gui.textFormat.tab.simple.tooltip": "Color the text with a color.",
"fzmm.gui.title.bannerEditor": "Banner editor",
"fzmm.gui.title.configs": "Configs",
"fzmm.gui.title.configs.icon": "🔧",
"fzmm.gui.title.converters": "Converters",
"fzmm.gui.title.copyText": "Copy text",
"fzmm.gui.title.encryptbook": "Encryptbook",
Expand Down
34 changes: 26 additions & 8 deletions src/main/resources/assets/fzmm/owo_ui/banner_editor.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<fzmm.styled-flow-layout direction="horizontal">
<children>
<fzmm.styled-label id="title">
<positioning type="absolute">20,20</positioning>
<positioning type="absolute">3,3</positioning>
<text translate="true">fzmm.gui.title.bannerEditor</text>
</fzmm.styled-label>

Expand Down Expand Up @@ -52,18 +52,30 @@
<button id="undo">
<text translate="true">fzmm.gui.button.arrow2.left</text>
<tooltip-text translate="true">fzmm.gui.bannerEditor.option.undo.tooltip</tooltip-text>
<positioning type="relative">0,100</positioning>

<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>

<spacer>
<sizing>
<horizontal method="expand">100</horizontal>
<vertical method="fixed">1</vertical>
</sizing>
</spacer>

<button id="redo">
<text translate="true">fzmm.gui.button.arrow2.right</text>
<tooltip-text translate="true">fzmm.gui.bannerEditor.option.redo.tooltip</tooltip-text>
<positioning type="relative">100,100</positioning>

<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>
</children>

<sizing>
<vertical method="fixed">20</vertical>
<horizontal method="fixed">95</horizontal>
</sizing>

Expand Down Expand Up @@ -185,20 +197,26 @@
</sizing>

<margins>
<vertical>30</vertical>
<top>10</top>
<bottom>10</bottom>
</margins>
</fzmm.styled-scroll>

<fzmm.styled-flow-layout direction="horizontal">
<children>

<button id="back-button">
<text translate="true">fzmm.gui.button.back</text>
<text translate="true">fzmm.gui.button.back.icon</text>
<tooltip-text translate="true">fzmm.gui.button.back</tooltip-text>

<margins>
<right>20</right>
<bottom>20</bottom>
<right>3</right>
<bottom>3</bottom>
</margins>

<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>

</children>
Expand Down
16 changes: 11 additions & 5 deletions src/main/resources/assets/fzmm/owo_ui/converters.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<fzmm.styled-flow-layout direction="vertical">
<children>
<fzmm.styled-label id="title">
<positioning type="absolute">20,20</positioning>
<positioning type="absolute">3,3</positioning>
<text translate="true">fzmm.gui.title.converters</text>
</fzmm.styled-label>

Expand Down Expand Up @@ -81,20 +81,26 @@
</sizing>

<margins>
<vertical>30</vertical>
<top>10</top>
<bottom>30</bottom>
</margins>
</fzmm.styled-scroll>

<fzmm.styled-flow-layout direction="horizontal">
<children>

<button id="back-button">
<text translate="true">fzmm.gui.button.back</text>
<text translate="true">fzmm.gui.button.back.icon</text>
<tooltip-text translate="true">fzmm.gui.button.back</tooltip-text>

<margins>
<right>20</right>
<bottom>20</bottom>
<right>3</right>
<bottom>3</bottom>
</margins>

<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>

</children>
Expand Down
64 changes: 35 additions & 29 deletions src/main/resources/assets/fzmm/owo_ui/encrypt_book.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<fzmm.styled-flow-layout direction="vertical">
<children>
<fzmm.styled-label id="title">
<positioning type="absolute">20,20</positioning>
<positioning type="absolute">3,3</positioning>
<text translate="true">fzmm.gui.title.encryptbook</text>
</fzmm.styled-label>

Expand Down Expand Up @@ -41,53 +41,55 @@
</sizing>

<margins>
<vertical>30</vertical>
<top>10</top>
<vertical>10</vertical>
</margins>
</fzmm.styled-scroll>

<fzmm.styled-flow-layout direction="horizontal">
<children>

<button id="give-button">
<text translate="true">fzmm.gui.encryptbook.button.give</text>

<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>

<button id="get-decryptor-button">
<text translate="true">fzmm.gui.encryptbook.button.getDecryptor</text>
</button>

</children>

<positioning type="relative">0,100</positioning>

<horizontal-alignment>right</horizontal-alignment>
<vertical-alignment>top</vertical-alignment>
<gap>4</gap>

<margins>
<left>20</left>
<bottom>20</bottom>
</margins>
</fzmm.styled-flow-layout>
<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>

<fzmm.styled-flow-layout direction="horizontal">
<children>
<spacer>
<sizing>
<horizontal method="expand">100</horizontal>
<vertical method="fixed">1</vertical>
</sizing>
</spacer>

<button id="back-button">
<text translate="true">fzmm.gui.button.back</text>
<text translate="true">fzmm.gui.button.back.icon</text>
<tooltip-text translate="true">fzmm.gui.button.back</tooltip-text>

<margins>
<right>20</right>
<bottom>20</bottom>
</margins>
<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>

</children>

<positioning type="relative">100,100</positioning>
<positioning type="relative">0,100</positioning>

<padding>
<horizontal>3</horizontal>
<bottom>3</bottom>
</padding>

<vertical-alignment>bottom</vertical-alignment>
<horizontal-alignment>right</horizontal-alignment>
<gap>4</gap>
</fzmm.styled-flow-layout>

<fzmm.styled-flow-layout direction="horizontal">
Expand All @@ -97,9 +99,13 @@
<text translate="true">fzmm.gui.button.faq</text>

<margins>
<right>20</right>
<top>20</top>
<right>3</right>
<top>3</top>
</margins>

<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>

</children>
Expand Down
37 changes: 23 additions & 14 deletions src/main/resources/assets/fzmm/owo_ui/head_gallery.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<fzmm.styled-flow-layout direction="horizontal">
<children>
<fzmm.styled-label id="title">
<positioning type="absolute">20,20</positioning>
<positioning type="absolute">3,3</positioning>
<text translate="true">fzmm.gui.title.headGallery</text>
</fzmm.styled-label>

Expand Down Expand Up @@ -75,7 +75,7 @@

<sizing>
<horizontal method="fill">30</horizontal>
<vertical method="fill">70</vertical>
<vertical method="fill">75</vertical>
</sizing>

</fzmm.styled-flow-layout>
Expand Down Expand Up @@ -164,7 +164,7 @@

<sizing>
<horizontal method="fill">52</horizontal>
<vertical method="fill">70</vertical>
<vertical method="fill">75</vertical>
</sizing>

<surface>
Expand All @@ -185,7 +185,7 @@

<sizing>
<horizontal method="fixed">48</horizontal>
<vertical method="fill">70</vertical>
<vertical method="fill">75</vertical>
</sizing>
</fzmm.styled-flow-layout>

Expand All @@ -197,20 +197,29 @@

<button id="minecraft-heads-button">
<text translate="true">fzmm.gui.headGallery.button.minecraftHeads</text>

<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>

<button id="back-button">
<text translate="true">fzmm.gui.button.back</text>
<text translate="true">fzmm.gui.button.back.icon</text>
<tooltip-text translate="true">fzmm.gui.button.back</tooltip-text>

<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>

</children>

<gap>8</gap>

<margins>
<right>20</right>
<bottom>10</bottom>
</margins>
<padding>
<right>3</right>
<bottom>3</bottom>
</padding>
</fzmm.styled-flow-layout>

</children>
Expand Down Expand Up @@ -268,19 +277,19 @@
<sizing>
<horizontal method="fill">100</horizontal>
</sizing>

<margins>
<right>8</right>
</margins>
</fzmm.styled-flow-layout>

<sizing>
<vertical method="fill">100</vertical>
</sizing>

<margins>
<bottom>20</bottom>
<bottom>18</bottom>
</margins>

<padding>
<right>8</right>
</padding>
</fzmm.styled-scroll>
</children>

Expand Down
27 changes: 20 additions & 7 deletions src/main/resources/assets/fzmm/owo_ui/head_generator.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<fzmm.styled-flow-layout direction="vertical">
<children>
<fzmm.styled-label id="title">
<positioning type="absolute">20,20</positioning>
<positioning type="absolute">3,3</positioning>
<text translate="true">fzmm.gui.title.headGenerator</text>
</fzmm.styled-label>

Expand All @@ -22,7 +22,7 @@
</children>

<margins>
<top>48</top>
<top>28</top>
</margins>
</fzmm.styled-flow-layout>

Expand Down Expand Up @@ -193,9 +193,13 @@
<text translate="true">fzmm.gui.headGenerator.button.resourcePackInfo</text>

<margins>
<right>20</right>
<top>20</top>
<right>3</right>
<top>3</top>
</margins>

<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>

</children>
Expand All @@ -207,6 +211,10 @@
<children>
<button id="open-folder-button">
<text translate="true">fzmm.gui.headGenerator.button.openFolder</text>

<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>

<spacer>
Expand All @@ -217,13 +225,18 @@
</spacer>

<button id="back-button">
<text translate="true">fzmm.gui.button.back</text>
<text translate="true">fzmm.gui.button.back.icon</text>
<tooltip-text translate="true">fzmm.gui.button.back</tooltip-text>

<sizing>
<vertical method="fixed">16</vertical>
</sizing>
</button>
</children>

<padding>
<horizontal>20</horizontal>
<bottom>20</bottom>
<horizontal>3</horizontal>
<bottom>3</bottom>
<top>5</top>
</padding>
</fzmm.styled-flow-layout>
Expand Down
Loading

0 comments on commit 8bd33c4

Please sign in to comment.