-
Notifications
You must be signed in to change notification settings - Fork 218
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add image bar component (#323)
- Loading branch information
Showing
7 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<UserControl | ||
x:Class="GlazeWM.Bar.Components.ImageComponent" | ||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | ||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | ||
xmlns:local="clr-namespace:GlazeWM.Bar.Components" | ||
mc:Ignorable="d"> | ||
<Image Source="{Binding Source}" /> | ||
</UserControl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using System.Windows.Controls; | ||
|
||
namespace GlazeWM.Bar.Components | ||
{ | ||
/// <summary> | ||
/// Interaction logic for ImageComponent.xaml | ||
/// </summary> | ||
public partial class ImageComponent : UserControl | ||
{ | ||
public ImageComponent() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using GlazeWM.Domain.UserConfigs; | ||
|
||
namespace GlazeWM.Bar.Components | ||
{ | ||
public class ImageComponentViewModel : ComponentViewModel | ||
{ | ||
private ImageComponentConfig _config => _componentConfig as ImageComponentConfig; | ||
|
||
public string Source => _config.Source; | ||
|
||
public ImageComponentViewModel( | ||
BarViewModel parentViewModel, | ||
ImageComponentConfig config) : base(parentViewModel, config) | ||
{ | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
namespace GlazeWM.Domain.UserConfigs | ||
{ | ||
public class ImageComponentConfig : BarComponentConfig | ||
{ | ||
/// <summary> | ||
/// Path to image | ||
/// </summary> | ||
public string Source { get; set; } | ||
} | ||
} |