From ecb11fc9094e97f8cbfb01e854b14b20806b0309 Mon Sep 17 00:00:00 2001 From: "NVENTIVE\\vy.nguyen" Date: Wed, 23 Aug 2023 14:35:57 -0400 Subject: [PATCH] feat: Add MediaPlayerElement styles and sample pages --- .../Uno.Cupertino/Uno.Cupertino.csproj | 2 +- .../Controls/v2/MediaPlayerElement.xaml | 674 ++++++++++++++++++ .../Styles/Controls/v2/_Resources.xaml | 2 + src/library/Uno.Material/Uno.Material.csproj | 2 +- ...ng_Started_with_Uno_Platform_for_Figma.png | Bin 0 -> 306469 bytes ...ng_Started_with_Uno_Platform_for_Figma.mp4 | Bin 0 -> 3887290 bytes .../MediaPlayerElementSamplePage.xaml | 55 ++ .../MediaPlayerElementSamplePage.xaml.cs | 41 ++ .../MediaPlayerElementSample_NestedPage1.xaml | 55 ++ ...diaPlayerElementSample_NestedPage1.xaml.cs | 33 + .../MediaPlayerElementSample_NestedPage2.xaml | 57 ++ ...diaPlayerElementSample_NestedPage2.xaml.cs | 33 + .../MediaPlayerElementSample_NestedPage3.xaml | 52 ++ ...diaPlayerElementSample_NestedPage3.xaml.cs | 33 + .../MediaPlayerElementSample_NestedPage4.xaml | 219 ++++++ ...diaPlayerElementSample_NestedPage4.xaml.cs | 33 + .../MediaPlayerElementSample_NestedPage5.xaml | 80 +++ ...diaPlayerElementSample_NestedPage5.xaml.cs | 46 ++ .../Styles/XamlDisplay.xaml | 71 ++ .../Uno.Themes.Samples.Shared.projitems | 44 ++ .../Uno.Themes.Samples.Wasm.csproj | 1 + ...ng_Started_with_Uno_Platform_for_Figma.png | Bin 0 -> 306469 bytes ...ng_Started_with_Uno_Platform_for_Figma.mp4 | Bin 0 -> 3887290 bytes 23 files changed, 1531 insertions(+), 2 deletions(-) create mode 100644 src/library/Uno.Material/Styles/Controls/v2/MediaPlayerElement.xaml create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Assets/Thumbnails/Getting_Started_with_Uno_Platform_for_Figma.png create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Assets/Videos/Getting_Started_with_Uno_Platform_for_Figma.mp4 create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Content/Controls/MediaPlayerElementSamplePage.xaml create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Content/Controls/MediaPlayerElementSamplePage.xaml.cs create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Content/NestedSamples/MediaPlayerElementSample_NestedPage1.xaml create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Content/NestedSamples/MediaPlayerElementSample_NestedPage1.xaml.cs create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Content/NestedSamples/MediaPlayerElementSample_NestedPage2.xaml create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Content/NestedSamples/MediaPlayerElementSample_NestedPage2.xaml.cs create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Content/NestedSamples/MediaPlayerElementSample_NestedPage3.xaml create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Content/NestedSamples/MediaPlayerElementSample_NestedPage3.xaml.cs create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Content/NestedSamples/MediaPlayerElementSample_NestedPage4.xaml create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Content/NestedSamples/MediaPlayerElementSample_NestedPage4.xaml.cs create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Content/NestedSamples/MediaPlayerElementSample_NestedPage5.xaml create mode 100644 src/samples/UWP/Uno.Themes.Samples.Shared/Content/NestedSamples/MediaPlayerElementSample_NestedPage5.xaml.cs create mode 100644 src/samples/Uno.Themes.Samples/Uno.Themes.Samples.Shared/Assets/Thumbnails/Getting_Started_with_Uno_Platform_for_Figma.png create mode 100644 src/samples/Uno.Themes.Samples/Uno.Themes.Samples.Shared/Assets/Videos/Getting_Started_with_Uno_Platform_for_Figma.mp4 diff --git a/src/library/Uno.Cupertino/Uno.Cupertino.csproj b/src/library/Uno.Cupertino/Uno.Cupertino.csproj index 6e8ea3274..f38866575 100644 --- a/src/library/Uno.Cupertino/Uno.Cupertino.csproj +++ b/src/library/Uno.Cupertino/Uno.Cupertino.csproj @@ -55,7 +55,7 @@ - + diff --git a/src/library/Uno.Material/Styles/Controls/v2/MediaPlayerElement.xaml b/src/library/Uno.Material/Styles/Controls/v2/MediaPlayerElement.xaml new file mode 100644 index 000000000..409314c23 --- /dev/null +++ b/src/library/Uno.Material/Styles/Controls/v2/MediaPlayerElement.xaml @@ -0,0 +1,674 @@ + + + + #000000 + + + #FFFFFF + + + 48,0,48,27 + + + + + + + + 0 + 7,2,7,1 + 12,-1,8,1 + 1 + 40 + 40 + 32 + 190 + 296 + 720 + + + #000000 + + + #FFFFFF + + + 48,0,48,27 + + + + + + + + 0 + 7,2,7,1 + 12,-1,8,1 + 1 + 40 + 40 + 32 + 190 + 296 + 720 + + + + m19,12h-2v3h-3v2h5v-5Zm-12-3h3v-2h-5v5h2v-3Zm14-6H3c-1.1,0-2,.9-2,2v14c0,1.1.9,2,2,2h18c1.1,0,2-.9,2-2V5c0-1.1-.9-2-2-2Zm0,16.01H3V4.99h18v14.02Z + m16.76,13.81c.08.08.12.17.12.27v4.54c0,.11-.04.2-.12.27-.07.07-.16.11-.26.11s-.19-.04-.26-.11l-1.39-1.4h-.59c-.1,0-.19-.04-.26-.11-.07-.08-.11-.17-.11-.27v-1.51c0-.11.04-.2.11-.27s.16-.11.26-.11h.59l1.39-1.4c.07-.07.16-.11.26-.11h0c.1-.01.19.03.26.1Zm1.87,1.74v-.05c-.04-.15-.08-.3-.13-.44-.04-.12-.09-.23-.13-.32,0-.02-.02-.04-.03-.06-.03-.06-.08-.11-.14-.15-.06-.04-.12-.06-.19-.06-.1,0-.19.04-.26.11s-.11.16-.11.27c0,.03,0,.07.02.13.02.05.04.1.06.16l.07.17s.02.05.03.07c.01.03.02.05.02.07.05.15.09.3.12.46.04.15.05.31.05.47s-.02.31-.05.47c-.03.16-.07.31-.12.46,0,.01-.01.03-.02.04,0,.02-.02.05-.03.09,0,.02-.02.04-.02.06-.02.04-.03.07-.05.11l-.06.17s-.02.09-.02.13c0,.1.04.19.11.27.07.07.16.11.26.11.07,0,.13-.02.19-.05.06-.04.11-.09.14-.15.06-.11.11-.24.16-.38.05-.15.09-.29.13-.44.04-.15.07-.3.09-.45v-.03c.02-.14.04-.27.04-.38,0-.12-.01-.26-.04-.41-.02-.15-.05-.3-.09-.45Zm.37-10.54H5c-1.11,0-2,.91-2,2.02v8.48c0,1.11.89,2.02,2,2.02h7.53v-1.51H4.5V6.52h15v5.45h1.5v-4.94c0-1.11-.9-2.02-2-2.02Zm.96,9.5v.02c-.03-.07-.06-.15-.1-.24l-.02-.05c-.03-.08-.07-.15-.11-.22-.05-.09-.11-.16-.18-.22-.07-.06-.14-.09-.23-.09-.11,0-.2.04-.27.11s-.11.16-.11.27c0,.05,0,.09.02.12.02.03.04.06.06.1.1.16.17.32.23.47.09.25.15.51.19.77.04.26.06.53.06.8s-.02.53-.06.8c-.04.26-.1.52-.19.77-.04.1-.08.19-.12.27-.05.08-.1.16-.15.25-.01.02-.02.05-.03.08v.09c0,.11.04.2.11.27.07.07.16.11.27.11.09,0,.16-.03.23-.09s.12-.13.18-.22c.05-.09.1-.18.13-.27.04-.09.07-.18.09-.24.11-.3.19-.6.23-.9.05-.31.07-.62.07-.93s-.02-.62-.07-.93-.12-.61-.23-.9Z + m19,4H5c-1.11,0-2,.9-2,2v12c0,1.1.89,2,2,2h14c1.1,0,2-.9,2-2V6c0-1.1-.9-2-2-2Zm-8,7h-1.5v-.5h-2v3h2v-.5h1.5v1c0,.55-.45,1-1,1h-3c-.55,0-1-.45-1-1v-4c0-.55.45-1,1-1h3c.55,0,1,.45,1,1v1Zm7,0h-1.5v-.5h-2v3h2v-.5h1.5v1c0,.55-.45,1-1,1h-3c-.55,0-1-.45-1-1v-4c0-.55.45-1,1-1h3c.55,0,1,.45,1,1v1Z + m19.5,5.5v13H4.5V5.5h15Zm-.5-1.5H5c-1.11,0-2,.9-2,2v12c0,1.1.89,2,2,2h14c1.1,0,2-.9,2-2V6c0-1.1-.9-2-2-2Zm-8,7h-1.5v-.5h-2v3h2v-.5h1.5v1c0,.55-.45,1-1,1h-3c-.55,0-1-.45-1-1v-4c0-.55.45-1,1-1h3c.55,0,1,.45,1,1v1Zm7,0h-1.5v-.5h-2v3h2v-.5h1.5v1c0,.55-.45,1-1,1h-3c-.55,0-1-.45-1-1v-4c0-.55.45-1,1-1h3c.55,0,1,.45,1,1v1Z + m21,3H3c-1.1,0-2,.9-2,2v3h2v-3h18v14h-7v2h7c1.1,0,2-.9,2-2V5c0-1.1-.9-2-2-2ZM1,18v3h3c0-1.66-1.34-3-3-3Zm0-4v2c2.76,0,5,2.24,5,5h2c0-3.87-3.13-7-7-7Zm0-4v2c4.97,0,9,4.03,9,9h2c0-6.08-4.93-11-11-11Z + m4,5.11c-2.16,0-2,2-2,2v12.89c0,1.1.9,2,2,2h13.47s1.91.13,1.91-2H4V5.11ZM20,2h-12c-1.1,0-2,.9-2,2v12c0,1.1.9,2,2,2h12c1.1,0,2-.9,2-2V4c0-1.1-.9-2-2-2Zm-6.4,11.3c-.66.49-1.6.02-1.6-.8v-5c0-.82.94-1.29,1.6-.8l3.33,2.5c.53.4.53,1.2,0,1.6l-3.33,2.5Z + m4,16.57h3.43v3.43h2.29v-5.71H4v2.29Zm3.43-9.14h-3.43v2.29h5.71v-5.71h-2.29v3.43Zm6.86,12.57h2.29v-3.43h3.43v-2.29h-5.71v5.71Zm2.29-12.57v-3.43h-2.29v5.71h5.71v-2.29h-3.43Z + m5.5,16.82c-.63.46-1.5,0-1.5-.81V7.99c0-.8.87-1.27,1.5-.81l5.5,4.01c.54.39.54,1.22,0,1.61l-5.5,4.01Zm7.08-8.83v8.02c0,.8.87,1.27,1.5.81l5.5-4.01c.54-.39.54-1.22,0-1.61l-5.5-4.01c-.63-.46-1.5,0-1.5.81Z + m6.29,14.29h-2.29v5.71h5.71v-2.29h-3.43v-3.43Zm-2.29-4.57h2.29v-3.43h3.43v-2.29H4v5.71Zm13.71,8h-3.43v2.29h5.71v-5.71h-2.29v3.43Zm-3.43-13.71v2.29h3.43v3.43h2.29v-5.71h-5.71Z + m16.18,12.59l-2.3-2.3v-.56c0-.7.74-1.13,1.21-.62.71.75,1.14,1.77,1.14,2.88,0,.21-.02.4-.05.59Zm-1.64-6.66c-.38-.16-.66-.52-.66-.94v-.06c0-.6.56-1.05,1.13-.84,3.19,1.21,5.45,4.29,5.45,7.9,0,1.41-.35,2.74-.97,3.9l-1.42-1.42c.32-.77.51-1.6.51-2.48,0-2.73-1.67-5.08-4.04-6.07Zm-2.54,4.88l8.46,8.46-1.19,1.19-1.92-1.93c-.7.57-1.49,1.03-2.34,1.36-.56.22-1.12-.23-1.12-.84v-.06c0-.41.28-.77.66-.94.52-.23,1.01-.52,1.46-.87l-3.99-3.99v4.06c0,.91-1.15,1.3-1.73.66l-2.97-2.82c-.18-.18-.42-.28-.66-.28h-2.69c-.52,0-.94-.42-.94-.94v-3.76c0-.52.42-.94.94-.94h4.05L3.54,4.73l1.19-1.19,7.27,7.27Zm0-2.4l-2.16-1.92.42-.39c.75-.64,1.79-.21,1.75.72v1.59Z + m16,7c0-.55.45-1,1-1s1,.45,1,1v10c0,.55-.45,1-1,1s-1-.45-1-1V7Zm-8.42,9.92l5.77-4.1c.56-.4.56-1.24,0-1.63l-5.77-3.89c-.66-.47-1.58,0-1.58.82v7.99c0,.81.91,1.28,1.58.82Z + m9,15c0,.55.45,1,1,1s1-.45,1-1v-6c0-.55-.45-1-1-1s-1,.45-1,1v6Zm3-13C6.48,2,2,6.48,2,12s4.48,10,10,10,10-4.48,10-10S17.52,2,12,2Zm0,18c-4.41,0-8-3.59-8-8s3.59-8,8-8,8,3.59,8,8-3.59,8-8,8Zm1-5c0,.55.45,1,1,1s1-.45,1-1v-6c0-.55-.45-1-1-1s-1,.45-1,1v6Z + m8.52,6.15c-.66-.41-1.52.05-1.52.82v10.06c0,.77.86,1.23,1.52.82l8.03-5.03c.61-.38.61-1.26,0-1.64l-8.03-5.03Z + m18.18,13.66c.14-.53.22-1.08.22-1.66s-.08-1.13-.22-1.66c-.15-.55-.36-1.06-.64-1.54-.56-.97-1.37-1.78-2.34-2.34-.48-.28-1-.49-1.54-.64-.53-.14-1.08-.22-1.66-.22s-1.13.08-1.66.22l-.41-1.55c.66-.18,1.36-.27,2.07-.27s1.41.09,2.07.27c.68.18,1.33.45,1.93.8,1.21.7,2.22,1.71,2.93,2.93.35.6.62,1.25.8,1.93.18.66.27,1.36.27,2.07s-.09,1.41-.27,2.07c-.18.68-.45,1.33-.8,1.93-.7,1.21-1.71,2.22-2.93,2.93-.6.35-1.25.62-1.93.8-.66.18-1.36.27-2.07.27s-1.41-.09-2.07-.27l.41-1.55c.53.14,1.08.22,1.66.22s1.13-.08,1.66-.22c.55-.15,1.06-.36,1.54-.64.97-.56,1.78-1.37,2.34-2.34.28-.48.49-1,.64-1.54Zm-9.38-7.2l-.8-1.38c-1.21.7-2.22,1.71-2.93,2.93l1.38.8c.56-.97,1.37-1.78,2.34-2.34Zm-2.98,3.89c-.14.53-.22,1.08-.22,1.66s.08,1.13.22,1.66l-1.55.41c-.18-.66-.27-1.36-.27-2.07s.09-1.41.27-2.07l1.55.41Zm.64,4.86l-1.38.8c.7,1.21,1.71,2.22,2.93,2.93l.8-1.38c-.97-.56-1.78-1.37-2.34-2.34Zm7.75-2.82l-3.08,2.19c-.35.25-.84,0-.84-.44v-4.26c0-.43.49-.69.84-.44l3.08,2.08c.3.21.3.66,0,.87Z + m7,6c-.55,0-1,.45-1,1v10c0,.55.45,1,1,1s1-.45,1-1V7c0-.55-.45-1-1-1Zm3.66,6.82l5.77,4.07c.66.47,1.58,0,1.58-.82v-8.07c0-.81-.91-1.28-1.58-.82l-5.77,4c-.56.4-.56,1.24,0,1.63Z + m12,4.23v-1.74c0-.43-.54-.65-.85-.34l-2.79,2.71c-.2.19-.2.5,0,.69l2.79,2.71c.31.31.85.09.85-.34v-1.74c3.31,0,6,2.61,6,5.83,0,.72-.14,1.42-.39,2.06-.16.4-.1.87.22,1.17l.05.05c.45.44,1.21.36,1.47-.21.42-.94.66-1.98.66-3.07,0-4.29-3.58-7.77-8-7.77Zm0,13.6c-3.31,0-6-2.61-6-5.83,0-.72.14-1.42.39-2.06.16-.4.1-.87-.22-1.17l-.05-.05c-.45-.44-1.21-.36-1.47.21-.42.94-.66,1.98-.66,3.07,0,4.29,3.58,7.77,8,7.77v1.74c0,.43.54.65.85.34l2.79-2.71c.2-.19.2-.5,0-.69l-2.79-2.71c-.31-.31-.85-.09-.85.34v1.74Z + m12,4.23v-1.74c0-.43-.54-.65-.85-.34l-2.79,2.71c-.2.19-.2.5,0,.69l2.79,2.71c.31.31.85.09.85-.34v-1.74c3.31,0,6,2.61,6,5.83,0,.72-.14,1.42-.39,2.06-.16.4-.1.87.22,1.17l.05.05c.45.44,1.21.36,1.47-.21.42-.94.66-1.98.66-3.07,0-4.29-3.58-7.77-8-7.77Zm0,13.6c-3.31,0-6-2.61-6-5.83,0-.72.14-1.42.39-2.06.16-.4.1-.87-.22-1.17l-.05-.05c-.45-.44-1.21-.36-1.47.21-.42.94-.66,1.98-.66,3.07,0,4.29,3.58,7.77,8,7.77v1.74c0,.43.54.65.85.34l2.79-2.71c.2-.19.2-.5,0-.69l-2.79-2.71c-.31-.31-.85-.09-.85.34v1.74Zm.66-3.93h-.85v-3.26l-1.01.31v-.69l1.77-.63h.09v4.27Z + m11.41,16.01c0,.8-.87,1.27-1.5.81l-5.5-4.01c-.54-.39-.54-1.22,0-1.61l5.5-4.01c.63-.46,1.5,0,1.5.81v8.02Zm1.58-3.21l5.5,4.01c.63.46,1.5,0,1.5-.81V7.99c0-.8-.87-1.27-1.5-.81l-5.5,4.01c-.54.39-.54,1.22,0,1.61Z + m11.97,5.51v-2.51c0-.45-.54-.67-.86-.35l-3.81,3.51c-.2.2-.2.51,0,.71l3.81,3.53c.32.31.86.09.86-.35v-2.53c3.32,0,6.02,2.69,6.02,6s-2.7,6-6.02,6c-2.98,0-5.46-2.17-5.94-5-.09-.54-.53-1-1.09-1s-1.01.45-.94,1c.49,3.95,3.87,7,7.97,7,4.44,0,8.03-3.58,8.03-8s-3.59-8-8.03-8Zm3.15,8.6c0,.32-.03.6-.1.82-.07.22-.17.42-.29.57-.12.15-.28.26-.45.33-.17.07-.37.1-.59.1s-.41-.03-.59-.1c-.18-.07-.33-.18-.46-.33-.13-.15-.23-.34-.3-.57-.07-.23-.11-.5-.11-.82v-.74c0-.32.03-.6.1-.82.07-.22.17-.42.29-.57.12-.15.28-.26.45-.33.17-.07.37-.1.59-.1s.41.03.59.1c.18.07.33.18.46.33.13.15.23.34.3.57.07.23.11.5.11.82v.74Zm-.88-1.3s0-.03,0-.04c-.03-.13-.07-.23-.12-.31s-.11-.14-.19-.17c-.06-.02-.11-.04-.17-.05-.02,0-.05,0-.08,0-.06,0-.11,0-.17.02-.01,0-.03,0-.04.01-.01,0-.03.01-.04.02-.07.03-.14.09-.19.17-.05.08-.09.18-.12.31-.03.13-.04.29-.04.48v.97c0,.19,0,.35.04.48.03.13.07.24.12.32.05.08.11.14.19.17.08.03.16.05.25.05.04,0,.08,0,.12-.01.05,0,.09-.02.13-.04.07-.03.14-.09.19-.17s.09-.19.11-.32c.02-.13.04-.29.04-.48v-.97h0c0-.15,0-.28-.02-.39,0-.02,0-.04,0-.05Zm-3.4,3.06h-.85v-3.26l-1.01.31v-.69l1.77-.63h.09v4.27Z + m12.03,3v2.51c-4.44,0-8.03,3.58-8.03,8s3.59,8,8.03,8c4.1,0,7.47-3.05,7.97-7,.07-.55-.39-1-.94-1s-.99.45-1.09,1c-.48,2.84-2.96,5-5.94,5-3.32,0-6.02-2.69-6.02-6s2.7-6,6.02-6v2.53c0,.45.54.67.86.35l3.81-3.53c.2-.2.2-.51,0-.71l-3.81-3.51c-.32-.31-.86-.09-.86.35Zm1.74,8.5h.02s.02,0,.02,0c.21,0,1.43-.02,1.42,1.82v.74c0,1.84-1.21,1.82-1.42,1.82h-.02s-.02,0-.02,0c-.19,0-1.42.02-1.42-1.82v-.74c0-1.84,1.22-1.82,1.42-1.82Zm.03,3.7c.38,0,.59-.26.59-1.03v-.97c0-.75-.22-1.01-.6-1.01s-.59.26-.59,1.01v.97c0,.77.22,1.03.6,1.03Zm-4.42-.54c0,.37.33.54.62.54.44,0,.65-.27.65-.59,0-.22-.05-.64-.7-.64h-.45v-.66h.46c.22,0,.63-.07.63-.59h0c0-.05,0-.54-.58-.54-.26,0-.57.14-.57.48h-.85c0-.81.78-1.16,1.4-1.16,1.39,0,1.44,1.01,1.44,1.22,0,.6-.54.87-.65.92.26.1.71.34.71,1,0,.79-.64,1.25-1.51,1.25-.55,0-1.45-.26-1.45-1.23h.85Z + m4,9.17c-.55,0-1,.42-1,.94v3.78c0,.52.45.94,1,.94h2.59c.27,0,.52.1.71.28l3,2.83c.63.6,1.71.17,1.71-.67V6.72c0-.84-1.08-1.26-1.71-.67l-3,2.83c-.19.18-.44.28-.71.28h-2.59Zm12.5,2.83c0-1.12-.46-2.14-1.21-2.9-.51-.51-1.29-.08-1.29.62v4.56c0,.7.78,1.13,1.29.62.75-.76,1.21-1.77,1.21-2.9Zm-1.3-7.95c-.6-.22-1.2.24-1.2.84v.06c0,.42.29.78.7.94,2.52,1,4.3,3.36,4.3,6.1s-1.77,5.1-4.3,6.1c-.41.16-.7.52-.7.94v.06c0,.61.6,1.06,1.2.84,3.39-1.22,5.8-4.32,5.8-7.95s-2.41-6.73-5.8-7.95Z + + + + + + + + + + + + + + + +