Skip to content

Commit

Permalink
replace app image with OEM Asset Character
Browse files Browse the repository at this point in the history
  • Loading branch information
MyDrift-user committed Mar 2, 2025
1 parent 8a0e0c7 commit 4aba74b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 19 deletions.
32 changes: 16 additions & 16 deletions functions/private/Initalize-InstallAppEntry.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -70,22 +70,22 @@ function Initialize-InstallAppEntry {
$imageAndNamePanel.Orientation = "Horizontal"
$imageAndNamePanel.VerticalAlignment = "Center"

# Create the Image and set a placeholder
$image = New-Object Windows.Controls.Image
# $image.Name = "wpfapplogo" + $App.Name
$image.Width = 40
$image.Height = 40
$image.Margin = New-Object Windows.Thickness(0, 0, 10, 0)
$image.Source = $noimage # Ensure $noimage is defined in your script

# Clip the image corners
$image.Clip = New-Object Windows.Media.RectangleGeometry
$image.Clip.Rect = New-Object Windows.Rect(0, 0, $image.Width, $image.Height)
$image.Clip.RadiusX = 5
$image.Clip.RadiusY = 5
$image.SetResourceReference([Windows.Controls.Control]::VisibilityProperty, "AppTileCompactVisibility")

$imageAndNamePanel.Children.Add($image) | Out-Null
# Create the icon TextBlock
$icon = New-Object Windows.Controls.TextBlock
$icon.Text = [char]0xE74C # OEM Icon
$icon.FontFamily = "Segoe MDL2 Assets"
$icon.FontSize = 40
$icon.Width = 50
$icon.Height = 50
$icon.Margin = New-Object Windows.Thickness(10, 10, 10, 2)
$icon.SetResourceReference([Windows.Controls.Control]::ForegroundProperty, "MainForegroundColor")
$icon.Background = "Transparent"
$icon.HorizontalAlignment = "Center"
$icon.VerticalAlignment = "Center"
$icon.TextAlignment = "Center"
$icon.SetResourceReference([Windows.Controls.Control]::VisibilityProperty, "AppTileCompactVisibility")

$imageAndNamePanel.Children.Add($icon) | Out-Null

# Create the TextBlock for the application name
$appName = New-Object Windows.Controls.TextBlock
Expand Down
3 changes: 0 additions & 3 deletions scripts/main.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,6 @@ $sync.Form.Add_Loaded({
Invoke-WinutilThemeChange -init $true
# Load the configuration files

$noimage = "https://images.emojiterra.com/google/noto-emoji/unicode-15/color/512px/1f4e6.png"
$noimage = [Windows.Media.Imaging.BitmapImage]::new([Uri]::new($noimage))

$sync.configs.applicationsHashtable = @{}
$sync.configs.applications.PSObject.Properties | ForEach-Object {
$sync.configs.applicationsHashtable[$_.Name] = $_.Value
Expand Down

0 comments on commit 4aba74b

Please sign in to comment.