Skip to content

Commit

Permalink
fix: embedded icon font not displaying correctly (glzr-io#398)
Browse files Browse the repository at this point in the history
  • Loading branch information
lars-berger authored and AryanSolanki637 committed Sep 18, 2023
1 parent e5c755a commit 232896c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 26 deletions.
1 change: 1 addition & 0 deletions GlazeWM.App/GlazeWM.App.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<TargetFramework>net7-windows10.0.17763.0</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<DebugType>embedded</DebugType>
<ApplicationIcon>Resources\icon.ico</ApplicationIcon>
<AssemblyName>GlazeWM</AssemblyName>
Expand Down
19 changes: 7 additions & 12 deletions GlazeWM.Domain/UserConfigs/NetworkComponentConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,35 +5,30 @@ public class NetworkComponentConfig : BarComponentConfig
/// <summary>
/// Label for wifi at 0% RSSI.
/// </summary>
public string LabelWifiStrength0 { get; set; } = "";
public string LabelWifiStrength0 { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>";
/// <summary>
/// Label for wifi at 25% RSSI.
/// </summary>
public string LabelWifiStrength25 { get; set; } = "";
public string LabelWifiStrength25 { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>";
/// <summary>
/// Label for wifi at 50% RSSI.
/// </summary>
public string LabelWifiStrength50 { get; set; } = "";
public string LabelWifiStrength50 { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>";
/// <summary>
/// Label for wifi at 75% RSSI.
/// </summary>
public string LabelWifiStrength75 { get; set; } = "";
public string LabelWifiStrength75 { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>";
/// <summary>
/// Label for wifi at 100% RSSI.
/// </summary>
public string LabelWifiStrength100 { get; set; } = "";
public string LabelWifiStrength100 { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>";
/// <summary>
/// Label for ethernet connection.
/// </summary>
public string LabelEthernet { get; set; } = "";
public string LabelEthernet { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>";
/// <summary>
/// Label for connection to the internet.
/// </summary>
public string LabelNoInternet { get; set; } = "  ";

public NetworkComponentConfig()
{
FontFamily = "GlazeWM.App.Resources#Material Icons";
}
public string LabelNoInternet { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>";
}
}
12 changes: 2 additions & 10 deletions GlazeWM.Domain/UserConfigs/SystemTrayComponentConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,11 @@ public class SystemTrayComponentConfig : BarComponentConfig
/// <summary>
/// Expands to show both pinned and unppined icons.
/// </summary>
public string LabelExpandText { get; set; } = "";
public string LabelExpandText { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>";

/// <summary>
/// Collapse to show only pinned icons.
/// </summary>
public string LabelCollapseText { get; set; } = "";

/// <summary>
/// Sets default icon font if one isn't specified.
/// </summary>
public SystemTrayComponentConfig()
{
FontFamily = "GlazeWM.App.Resources#Material Icons";
}
public string LabelCollapseText { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>";
}
}
8 changes: 4 additions & 4 deletions GlazeWM.Domain/UserConfigs/VolumeComponentConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@ public class VolumeComponentConfig : BarComponentConfig
/// <summary>
/// Label for low volume.
/// </summary>
public string LabelLow { get; set; } = "<attr ff='GlazeWM.App.Resources#Material Icons'></attr>{volume_level}%";
public string LabelLow { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>{volume_level}%";
/// <summary>
/// Label for medium volume.
/// </summary>
public string LabelMedium { get; set; } = "<attr ff='GlazeWM.App.Resources#Material Icons'></attr>{volume_level}%";
public string LabelMedium { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>{volume_level}%";
/// <summary>
/// Label for high volume.
/// </summary>
public string LabelHigh { get; set; } = "<attr ff='GlazeWM.App.Resources#Material Icons'></attr>{volume_level}%";
public string LabelHigh { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>{volume_level}%";
/// <summary>
/// Label for volume mute.
/// </summary>
public string LabelMute { get; set; } = "<attr ff='GlazeWM.App.Resources#Material Icons'></attr>{volume_level}%";
public string LabelMute { get; set; } = "<attr ff='pack://application:,,,/Resources/#Material Icons'></attr>{volume_level}%";
}

}

0 comments on commit 232896c

Please sign in to comment.