WinRT: Refactor icon specification usage
Naming for different logo sizes on WinRT has been varying in the past and evolved from using small/medium/large to some being explicit (71x71). Add new values introduced by 8.1 (310x150, 310x310,...) and clean up mixed usage. Detailed pixel versions overrule general specification and latter ones stay mostly for compatibility reasons. Still the preferred way is to use explicit pixel values. Task-number: QTBUG-43644 Change-Id: I9173ec2951a82e5eac9d8c9956bfb0bb4d1a2459 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Before Width: | Height: | Size: 2.6 KiB After Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 737 B After Width: | Height: | Size: 737 B |
BIN
mkspecs/common/winrt_winphone/assets/logo_310x150.png
Normal file
After Width: | Height: | Size: 2.6 KiB |
BIN
mkspecs/common/winrt_winphone/assets/logo_310x310.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 5.6 KiB After Width: | Height: | Size: 5.6 KiB |
BIN
mkspecs/common/winrt_winphone/assets/logo_70x70.png
Normal file
After Width: | Height: | Size: 2.0 KiB |
@ -27,14 +27,18 @@
|
||||
Description=\"$${WINRT_MANIFEST.description}\"
|
||||
BackgroundColor=\"$${WINRT_MANIFEST.background}\"
|
||||
ForegroundText=\"$${WINRT_MANIFEST.foreground}\"
|
||||
Square150x150Logo=\"$${WINRT_MANIFEST.logo_large}\"
|
||||
Square30x30Logo=\"$${WINRT_MANIFEST.logo_small}\">
|
||||
<m2:DefaultTile>
|
||||
Square150x150Logo=\"$${WINRT_MANIFEST.logo_150x150}\"
|
||||
Square30x30Logo=\"$${WINRT_MANIFEST.logo_30x30}\">
|
||||
<m2:DefaultTile Square310x310Logo=\"$${WINRT_MANIFEST.logo_310x310}\"
|
||||
Wide310x150Logo=\"$${WINRT_MANIFEST.logo_310x150}\"
|
||||
Square70x70Logo=\"$${WINRT_MANIFEST.logo_70x70}\">
|
||||
<m2:ShowNameOnTiles>
|
||||
<m2:ShowOn Tile=\"square150x150Logo\" />
|
||||
<m2:ShowOn Tile=\"wide310x150Logo\" />
|
||||
<m2:ShowOn Tile=\"square310x310Logo\" />
|
||||
</m2:ShowNameOnTiles>
|
||||
</m2:DefaultTile>
|
||||
<m2:SplashScreen Image=\"$${WINRT_MANIFEST.logo_splash}\" />$${WINRT_MANIFEST.rotation_preference}
|
||||
<m2:SplashScreen Image=\"$${WINRT_MANIFEST.logo_620x300}\" />$${WINRT_MANIFEST.rotation_preference}
|
||||
</m2:VisualElements>
|
||||
</Application>
|
||||
</Applications>$${WINRT_MANIFEST.capabilities}$${WINRT_MANIFEST.dependencies}
|
||||
|
@ -30,11 +30,13 @@
|
||||
Description=\"$${WINRT_MANIFEST.description}\"
|
||||
BackgroundColor=\"$${WINRT_MANIFEST.background}\"
|
||||
ForegroundText=\"$${WINRT_MANIFEST.foreground}\"
|
||||
Square150x150Logo=\"$${WINRT_MANIFEST.logo_large}\"
|
||||
Square150x150Logo=\"$${WINRT_MANIFEST.logo_150x150}\"
|
||||
Square44x44Logo=\"$${WINRT_MANIFEST.logo_44x44}\">
|
||||
<m3:DefaultTile Square71x71Logo=\"$${WINRT_MANIFEST.logo_71x71}\">
|
||||
<m3:DefaultTile Square71x71Logo=\"$${WINRT_MANIFEST.logo_71x71}\"
|
||||
Wide310x150Logo=\"$${WINRT_MANIFEST.logo_310x150}\">
|
||||
<m3:ShowNameOnTiles>
|
||||
<m3:ShowOn Tile=\"square150x150Logo\" />
|
||||
<m3:ShowOn Tile=\"wide310x150Logo\" />
|
||||
</m3:ShowNameOnTiles>
|
||||
</m3:DefaultTile>
|
||||
<m3:SplashScreen Image=\"$${WINRT_MANIFEST.logo_480x800}\" />$${WINRT_MANIFEST.rotation_preference}
|
||||
|
@ -137,6 +137,18 @@
|
||||
ICONS_FOUND ~= s/.*\\\$\\\$\\{WINRT_MANIFEST\\.((logo|tile)_[^\}]+)\\}.*/\\1/g
|
||||
for (ICON_NAME, ICONS_FOUND) {
|
||||
ICON_FILE = $$eval(WINRT_MANIFEST.$$ICON_NAME)
|
||||
isEmpty(ICON_FILE) {
|
||||
equals(ICON_NAME, "logo_310x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_wide)
|
||||
else: equals(ICON_NAME, "logo_150x150"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_large)
|
||||
# Windows Phone specifics
|
||||
else: equals(ICON_NAME, "logo_480x800"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash)
|
||||
else: equals(ICON_NAME, "logo_71x71"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium)
|
||||
else: equals(ICON_NAME, "logo_44x44"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small)
|
||||
# Windows RT specifics
|
||||
else: equals(ICON_NAME, "logo_620x300"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_splash)
|
||||
else: equals(ICON_NAME, "logo_70x70"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_medium)
|
||||
else: equals(ICON_NAME, "logo_30x30"): ICON_FILE = $$eval(WINRT_MANIFEST.logo_small)
|
||||
}
|
||||
isEmpty(ICON_FILE): ICON_FILE = $$WINRT_ASSETS_PATH/$${ICON_NAME}.png
|
||||
icon_$${ICON_NAME}.input = $$ICON_FILE
|
||||
icon_$${ICON_NAME}.output = $$BUILD_DIR/assets/$$basename(ICON_FILE)
|
||||
|