oobe: background update
authorLukasz Stanislawski <lukasz.stanislawski@gmail.com>
Wed, 1 Jul 2020 14:44:58 +0000 (16:44 +0200)
committerLukasz Stanislawski <lukasz.stanislawski@gmail.com>
Thu, 2 Jul 2020 06:35:19 +0000 (08:35 +0200)
Replace svg background with png due to display issues.
Center the background so in lower (720 hight) resolution
top and bottom will hide.

Change-Id: I61f51e6822da4f5c391bf74a310bfdac5eb50d12

Oobe/Oobe/Views/MainView.cs
Oobe/Oobe/res/0_BG_dark.png [new file with mode: 0644]
Oobe/Oobe/res/0_BG_dark.svg [deleted file]

index 771bb44..8e3aae6 100644 (file)
@@ -35,10 +35,12 @@ namespace Oobe.Views
 
         public MainView(Window win)
         {
-            View backImage = new View{
-                BackgroundImage = NUIApplication.Current.DirectoryInfo.Resource + "0_BG_dark.svg",
-                WidthResizePolicy = ResizePolicyType.FillToParent,
-                HeightResizePolicy = ResizePolicyType.FillToParent,
+            View backImage = new View
+            {
+                BackgroundImage = NUIApplication.Current.DirectoryInfo.Resource + "0_BG_dark.png",
+                PositionUsesPivotPoint = true,
+                PivotPoint = new Position(0.5f, 0.5f),
+                ParentOrigin = new Position(0.5f, 0.5f),
             };
 
             Size2D stackSize = new Size2D(
diff --git a/Oobe/Oobe/res/0_BG_dark.png b/Oobe/Oobe/res/0_BG_dark.png
new file mode 100644 (file)
index 0000000..c50ca45
Binary files /dev/null and b/Oobe/Oobe/res/0_BG_dark.png differ
diff --git a/Oobe/Oobe/res/0_BG_dark.svg b/Oobe/Oobe/res/0_BG_dark.svg
deleted file mode 100644 (file)
index 8d19b00..0000000
+++ /dev/null
@@ -1,42 +0,0 @@
-<svg id="_0_BG_dark" data-name="0_BG_dark" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1280" height="720" viewBox="0 0 1280 720">\r
-  <defs>\r
-    <clipPath id="clip-path">\r
-      <rect id="Rectangle_876" data-name="Rectangle 876" width="1280" height="720" fill="none"/>\r
-    </clipPath>\r
-    <linearGradient id="linear-gradient" x1="0.164" y1="-0.433" x2="1.021" y2="-0.433" gradientUnits="objectBoundingBox">\r
-      <stop offset="0" stop-color="#052759"/>\r
-      <stop offset="1" stop-color="#a4b7d6"/>\r
-    </linearGradient>\r
-    <linearGradient id="linear-gradient-2" x1="-2.829" y1="-2.482" x2="-1.972" y2="-2.482" gradientUnits="objectBoundingBox">\r
-      <stop offset="0" stop-color="#00737f"/>\r
-      <stop offset="0.126" stop-color="#80a8b2"/>\r
-      <stop offset="0.351" stop-color="#1e6fa6"/>\r
-      <stop offset="1" stop-color="#5068e8"/>\r
-    </linearGradient>\r
-    <linearGradient id="linear-gradient-3" x1="0.152" y1="-5.005" x2="0.895" y2="-5.005" gradientUnits="objectBoundingBox">\r
-      <stop offset="0" stop-color="#ef34a4"/>\r
-      <stop offset="1" stop-color="#051a46"/>\r
-    </linearGradient>\r
-    <linearGradient id="linear-gradient-5" x1="-0.438" y1="2.176" x2="0.081" y2="2.176" gradientUnits="objectBoundingBox">\r
-      <stop offset="0" stop-color="#e682be"/>\r
-      <stop offset="1" stop-color="#24468d"/>\r
-    </linearGradient>\r
-    <linearGradient id="linear-gradient-6" x1="-1.354" y1="-3.765" x2="-0.473" y2="-3.765" gradientUnits="objectBoundingBox">\r
-      <stop offset="0" stop-color="#07458b"/>\r
-      <stop offset="1" stop-color="#2bcb4b"/>\r
-    </linearGradient>\r
-  </defs>\r
-  <rect id="Rectangle_860" data-name="Rectangle 860" width="1278" height="720" transform="translate(2)" fill="#fff"/>\r
-  <g id="Group_2" data-name="Group 2" clip-path="url(#clip-path)">\r
-    <g id="Group_511" data-name="Group 511" transform="translate(-188.33 -193.578)">\r
-      <path id="Rectangle_860-2" data-name="Rectangle 860" d="M0,0H1280V720H0Z" transform="translate(188.322 193.567)" fill="#172061"/>\r
-      <path id="Path_238" data-name="Path 238" d="M57.869-.015l352.173-.3a57.749,57.749,0,0,1,57.814,57.824h0a57.99,57.99,0,0,1-57.914,57.924l-352.172.3A57.749,57.749,0,0,1-.045,57.91h0A57.99,57.99,0,0,1,57.869-.015Z" transform="translate(923.638 108.552) rotate(138)" opacity="0.5" fill="url(#linear-gradient)"/>\r
-      <path id="Path_239" data-name="Path 239" d="M57.869-.015l352.172-.3a57.749,57.749,0,0,1,57.814,57.825h0a57.99,57.99,0,0,1-57.914,57.924l-352.172.3A57.749,57.749,0,0,1-.045,57.91h0A57.99,57.99,0,0,1,57.869-.015Z" transform="translate(1608.571 696.239) rotate(138.039)" fill="url(#linear-gradient-2)"/>\r
-      <path id="Path_240" data-name="Path 240" d="M57.862-.02,340.828-.259a57.882,57.882,0,0,1-.1,115.763l-282.966.238A57.882,57.882,0,0,1,57.862-.02Z" transform="translate(385.194 815.83) rotate(142)" opacity="0.6" fill="url(#linear-gradient-3)"/>\r
-      <path id="Path_241" data-name="Path 241" d="M57.874-.021,340.9-.267a57.869,57.869,0,0,1-.1,115.739l-283.026.246a57.869,57.869,0,1,1,.1-115.739Z" transform="translate(1687.259 224.683) rotate(135)" opacity="0.6" fill="url(#linear-gradient-3)"/>\r
-      <path id="Path_242" data-name="Path 242" d="M57.869-.014,417.663-.325A57.749,57.749,0,0,1,475.476,57.5h0a57.99,57.99,0,0,1-57.914,57.924l-359.793.311A57.749,57.749,0,0,1-.045,57.911h0A57.99,57.99,0,0,1,57.869-.014Z" transform="translate(482.093 280.677) rotate(138.039)" fill="#99a5e6" opacity="0.9"/>\r
-      <path id="Path_243" data-name="Path 243" d="M57.871-.021l278.44-.241A57.749,57.749,0,0,1,394.127,57.56h0a57.99,57.99,0,0,1-57.916,57.923l-278.441.241A57.749,57.749,0,0,1-.045,57.9h0A57.99,57.99,0,0,1,57.871-.021Z" transform="translate(1455.802 84.73) rotate(137)" fill="url(#linear-gradient-5)"/>\r
-      <path id="Path_244" data-name="Path 244" d="M57.858-.027l194.9-.161a57.754,57.754,0,0,1,57.806,57.837h0a57.985,57.985,0,0,1-57.9,57.933l-194.9.161A57.754,57.754,0,0,1-.043,57.906h0A57.985,57.985,0,0,1,57.858-.027Z" transform="matrix(0.81, -0.587, 0.587, 0.81, 534.439, 965.677)" opacity="0.21" fill="url(#linear-gradient-6)"/>\r
-    </g>\r
-  </g>\r
-</svg>\r