Skip to content

Commit ccacb25

Browse files
authored
Merge pull request #13 from emiliano84/dev
Dev
2 parents 6062d1f + 83dfdc2 commit ccacb25

File tree

7 files changed

+243
-107
lines changed

7 files changed

+243
-107
lines changed

README.md

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Yugen Mosaic UWP
21
![logo](/Yugen.Mosaic.Uwp/Assets/SmallTile.scale-400.png)
32

3+
# Yugen Mosaic UWP
44
Yugen Mosaic is a free app that helps you to create digital art pictures made from your own pictures. For example you can create a photo mosaic, an image composed of many tiled photos.
55

66
## Contributing
@@ -9,5 +9,14 @@ Everyone is welcome to contribute, if you're looking to help out with the projec
99
## Getting started
1010
The project has been primarily built for the universal Windows platform (UWP), so you'll need the latest version of [Visual Studio 2019](https://www.visualstudio.com/) (including the community edition) and the latest Windows 10 SDK which you can install as part of the Visual Studio installer.
1111

12-
## License
13-
[ImageSharp](https://github.com/SixLabors/ImageSharp) is licensed under the [Apache 2.0 License.](Imagesharp-LICENSE)
12+
## Download
13+
Get the latest version in the [Microsoft Store.](https://www.microsoft.com/store/apps/9PF0S24CX0D4)
14+
15+
## Dependencies and References
16+
[Yugen Toolkit](https://github.com/emiliano84/Yugen.Toolkit)
17+
[ImageSharp](https://github.com/SixLabors/ImageSharp) is licensed under the [Apache 2.0 License.](Imagesharp-LICENSE)
18+
19+
## Special Thanks
20+
- Icon: [Yoshi](https://github.com/yoshiask)
21+
- UI: [Leisvan](https://twitter.com/leisvanCT)
22+
- Code Help: [Sergio](https://github.com/Sergio0694)

Yugen.Mosaic.Uwp/App.xaml

+48-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@
109109
</Setter>
110110
</Style>
111111

112-
<Style x:Key="ProgressRingStyle1"
112+
<Style x:Key="YugenProgressRingStyle"
113113
TargetType="ProgressRing">
114114
<Setter Property="Background"
115115
Value="Transparent" />
@@ -238,6 +238,53 @@
238238
</Setter>
239239
</Style>
240240

241+
<Style x:Key="YugenHyperlinkButtonStyle"
242+
TargetType="HyperlinkButton">
243+
<Setter Property="Foreground"
244+
Value="{ThemeResource DefaultTextForegroundThemeBrush}" />
245+
</Style>
246+
247+
<Style x:Key="YugenBodyTextBlockStyle"
248+
BasedOn="{StaticResource BodyTextBlockStyle}"
249+
TargetType="TextBlock">
250+
<Setter Property="Foreground"
251+
Value="{ThemeResource AppForegroundBrush}" />
252+
</Style>
253+
254+
<Style x:Key="YugenCaptionTextBlockStyle"
255+
BasedOn="{StaticResource CaptionTextBlockStyle}"
256+
TargetType="TextBlock">
257+
<Setter Property="Foreground"
258+
Value="{ThemeResource AppForegroundBrush}" />
259+
</Style>
260+
261+
<Style x:Key="YugenSubtitleTextBlockStyle"
262+
BasedOn="{StaticResource SubtitleTextBlockStyle}"
263+
TargetType="TextBlock">
264+
<Setter Property="Foreground"
265+
Value="{ThemeResource AppForegroundBrush}" />
266+
</Style>
267+
268+
<Style x:Key="YugenTitleTextBlockStyle"
269+
BasedOn="{StaticResource TitleTextBlockStyle}"
270+
TargetType="TextBlock">
271+
<Setter Property="Foreground"
272+
Value="{ThemeResource AppForegroundBrush}" />
273+
</Style>
274+
275+
<Style x:Key="YugenBaseTextBlockStyle"
276+
BasedOn="{StaticResource BaseTextBlockStyle}"
277+
TargetType="TextBlock">
278+
<Setter Property="Foreground"
279+
Value="{ThemeResource AppForegroundBrush}" />
280+
</Style>
281+
282+
<Style x:Key="YugenRadioButtonStyle"
283+
TargetType="RadioButton">
284+
<Setter Property="Foreground"
285+
Value="{ThemeResource AppForegroundBrush}" />
286+
</Style>
287+
241288
</ResourceDictionary>
242289

243290
</ResourceDictionary.MergedDictionaries>

Yugen.Mosaic.Uwp/App.xaml.cs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
using Windows.UI.Xaml;
88
using Windows.UI.Xaml.Controls;
99
using Windows.UI.Xaml.Navigation;
10-
using Yugen.Mosaic.Uwp.Extensions;
1110
using Yugen.Mosaic.Uwp.Services;
1211
using Yugen.Mosaic.Uwp.Views;
1312
using Yugen.Toolkit.Standard.Extensions;

Yugen.Mosaic.Uwp/Controls/SettingsDialog.xaml

+52-51
Original file line numberDiff line numberDiff line change
@@ -12,100 +12,101 @@
1212
<ContentDialog.Resources>
1313
<Thickness x:Key="ContentDialogPadding">0</Thickness>
1414
<converters:EnumToBooleanConverter x:Key="EnumToBooleanConverter"
15-
EnumType="ElementTheme" />
15+
EnumType="ElementTheme" />
1616
</ContentDialog.Resources>
1717

1818
<ContentDialog.DataContext>
1919
<vm:SettingsViewModel />
2020
</ContentDialog.DataContext>
2121

22-
<Grid Padding="15,15,15,30"
22+
<Grid Padding="16,16,16,32"
2323
Background="{ThemeResource AppDeepBackgroundBrush}">
2424

2525
<StackPanel Orientation="Vertical"
26-
Spacing="15"
26+
Spacing="16"
2727
MaxWidth="360">
2828

2929
<Grid>
30-
<TextBlock Text="Settings"
30+
31+
<TextBlock x:Uid="SettingsTitleTextBlock"
3132
Style="{ThemeResource TitleTextBlockStyle}"
32-
Foreground="{ThemeResource AppForegroundBrush}"
3333
HorizontalAlignment="Left"
34-
Margin="5,0,0,0" />
34+
Margin="4,0,0,0" />
3535
<Button Style="{StaticResource SoftRevealButtonStyle}"
3636
HorizontalAlignment="Right"
3737
VerticalAlignment="Top"
3838
Command="{x:Bind HideCommand}">
3939
<FontIcon Glyph="" />
4040
</Button>
41+
4142
</Grid>
4243

43-
<StackPanel Spacing="5"
44-
Padding="15,0,15,0">
45-
<TextBlock Text="Theme"
46-
Foreground="{ThemeResource AppForegroundBrush}"
47-
Style="{StaticResource SubtitleTextBlockStyle}" />
48-
<RadioButton Content="Light"
44+
<StackPanel Spacing="4"
45+
Padding="16,0">
46+
47+
<TextBlock x:Uid="SettingsThemeTextBlock"
48+
Style="{StaticResource YugenSubtitleTextBlockStyle}" />
49+
<RadioButton x:Uid="SettingsThemeLightTextBlock"
4950
Command="{x:Bind ViewModel.SwitchThemeCommand}"
5051
IsChecked="{x:Bind ViewModel.ElementTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Light, Mode=OneWay}"
51-
Foreground="{ThemeResource AppForegroundBrush}">
52+
Style="{ThemeResource YugenRadioButtonStyle}">
5253
<RadioButton.CommandParameter>
5354
<xaml:ElementTheme>Light</xaml:ElementTheme>
5455
</RadioButton.CommandParameter>
5556
</RadioButton>
56-
<RadioButton Content="Dark"
57+
<RadioButton x:Uid="SettingsThemeDarkTextBlock"
5758
Command="{x:Bind ViewModel.SwitchThemeCommand}"
5859
IsChecked="{x:Bind ViewModel.ElementTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Dark, Mode=OneWay}"
59-
Foreground="{ThemeResource AppForegroundBrush}">
60+
Style="{ThemeResource YugenRadioButtonStyle}">
6061
<RadioButton.CommandParameter>
6162
<xaml:ElementTheme>Dark</xaml:ElementTheme>
6263
</RadioButton.CommandParameter>
6364
</RadioButton>
64-
<RadioButton Content="Default"
65+
<RadioButton x:Uid="SettingsThemeDefaultTextBlock"
6566
Command="{x:Bind ViewModel.SwitchThemeCommand}"
6667
IsChecked="{x:Bind ViewModel.ElementTheme, Converter={StaticResource EnumToBooleanConverter}, ConverterParameter=Default, Mode=OneWay}"
67-
Foreground="{ThemeResource AppForegroundBrush}">
68+
Style="{ThemeResource YugenRadioButtonStyle}">
6869
<RadioButton.CommandParameter>
6970
<xaml:ElementTheme>Default</xaml:ElementTheme>
7071
</RadioButton.CommandParameter>
7172
</RadioButton>
73+
7274
</StackPanel>
7375

74-
<StackPanel Spacing="5"
75-
Padding="15,0,15,0">
76-
77-
<TextBlock Text="About"
78-
Foreground="{ThemeResource AppForegroundBrush}"
79-
Style="{StaticResource SubtitleTextBlockStyle}" />
80-
81-
<TextBlock Foreground="{ThemeResource AppForegroundBrush}"
82-
Style="{StaticResource CaptionTextBlockStyle}">
83-
<Run Text="{x:Bind ViewModel.AppName}"
84-
FontWeight="SemiBold" />
85-
<LineBreak />
86-
<Run Text="{x:Bind ViewModel.AppVersion}" />
87-
</TextBlock>
88-
89-
<TextBlock Foreground="{ThemeResource AppForegroundBrush}"
90-
Style="{StaticResource CaptionTextBlockStyle}">
91-
<Run Text="Developed by"
92-
FontWeight="SemiBold" />
93-
<LineBreak />
94-
<Run Text="{x:Bind ViewModel.Publisher}" />
95-
</TextBlock>
76+
<StackPanel Spacing="4"
77+
Padding="16,0">
9678

97-
<TextBlock Foreground="{ThemeResource AppForegroundBrush}"
98-
Style="{StaticResource CaptionTextBlockStyle}">
99-
<Run Text="Colaborators"
100-
FontWeight="SemiBold" />
101-
<LineBreak />
102-
<Run Text="{x:Bind ViewModel.Collaborator[0]}" />
103-
<LineBreak />
104-
<Run Text="{x:Bind ViewModel.Collaborator[1]}" />
105-
</TextBlock>
106-
107-
<HyperlinkButton Content="Rate and review"
108-
Command="{x:Bind ViewModel.LaunchRateAndReviewCommand}" />
79+
<TextBlock x:Uid="SettingsAboutTextBlock"
80+
Style="{StaticResource YugenSubtitleTextBlockStyle}" />
81+
82+
<TextBlock x:Uid="SettingsAppNameTextBlock"
83+
Style="{StaticResource YugenBodyTextBlockStyle}" />
84+
<TextBlock Style="{StaticResource YugenCaptionTextBlockStyle}"
85+
Text="{x:Bind ViewModel.AppVersion}" />
86+
87+
<TextBlock x:Uid="SettingsDevelopedTextBlock"
88+
Margin="0,4,0,0"
89+
Style="{StaticResource YugenBodyTextBlockStyle}"/>
90+
<HyperlinkButton x:Uid="SettingsDevelopedHyperlink"
91+
Content="{x:Bind ViewModel.Publisher}"
92+
Margin="0,-8,0,0"
93+
Style="{ThemeResource YugenHyperlinkButtonStyle}"/>
94+
95+
<TextBlock x:Uid="SettingsUITextBlock"
96+
Style="{StaticResource YugenBodyTextBlockStyle}" />
97+
<HyperlinkButton x:Uid="SettingsUIHyperlink"
98+
Margin="0,-8,0,0"
99+
Style="{ThemeResource YugenHyperlinkButtonStyle}" />
100+
101+
<TextBlock x:Uid="SettingsIconTextBlock"
102+
Style="{StaticResource YugenBodyTextBlockStyle}" />
103+
<HyperlinkButton x:Uid="SettingsIconHyperlink"
104+
Margin="0,-8,0,0"
105+
Style="{ThemeResource YugenHyperlinkButtonStyle}"/>
106+
107+
<HyperlinkButton x:Uid="SettingsRateHyperlink"
108+
NavigateUri="{x:Bind ViewModel.RateAndReviewUri}"
109+
Style="{ThemeResource YugenHyperlinkButtonStyle}"/>
109110

110111
</StackPanel>
111112

Yugen.Mosaic.Uwp/Strings/en-US/Resources.resw

+99
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,54 @@
117117
<resheader name="writer">
118118
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
119119
</resheader>
120+
<data name="MainAddMasterTextBlock.Text" xml:space="preserve">
121+
<value>Click here to choose a Master image</value>
122+
</data>
123+
<data name="MainAddTilesTextBlock.Text" xml:space="preserve">
124+
<value>Add Tiles</value>
125+
</data>
126+
<data name="MainGenerateButton.Content" xml:space="preserve">
127+
<value>Generate</value>
128+
</data>
129+
<data name="MainHeightTextBlock.Text" xml:space="preserve">
130+
<value>H:</value>
131+
</data>
132+
<data name="MainHelpTextBlock.Text" xml:space="preserve">
133+
<value>Help</value>
134+
</data>
135+
<data name="MainMasterImageTextBlock.Text" xml:space="preserve">
136+
<value>Master Image</value>
137+
</data>
138+
<data name="MainMosaicTypeTextBlock.Text" xml:space="preserve">
139+
<value>MosaicType</value>
140+
</data>
141+
<data name="MainOutputPropertiesTextBlock.Text" xml:space="preserve">
142+
<value>Output Properties</value>
143+
</data>
144+
<data name="MainResetButton.Content" xml:space="preserve">
145+
<value>Reset</value>
146+
</data>
147+
<data name="MainSaveButton.Content" xml:space="preserve">
148+
<value>Save</value>
149+
</data>
150+
<data name="MainSettingsTextBlock.Text" xml:space="preserve">
151+
<value>Settings</value>
152+
</data>
153+
<data name="MainShowGridCheckBox.Content" xml:space="preserve">
154+
<value>Show Grid</value>
155+
</data>
156+
<data name="MainTileProperties.Text" xml:space="preserve">
157+
<value>Tile Properties</value>
158+
</data>
159+
<data name="MainTilesListTextBlock.Text" xml:space="preserve">
160+
<value>Tiles list</value>
161+
</data>
162+
<data name="MainTitleTextBlock.Text" xml:space="preserve">
163+
<value>Yugen Mosaic</value>
164+
</data>
165+
<data name="MainWidthTextBlock.Text" xml:space="preserve">
166+
<value>W:</value>
167+
</data>
120168
<data name="OnboardingStageAddTilesDescription" xml:space="preserve">
121169
<value>Then add images. Yugen Mosaic will use them as tiles to build your mosaic. The more tiles you choose, the better result you will get!</value>
122170
</data>
@@ -163,4 +211,55 @@
163211
<data name="OnboardingStageTilePropertiesTitle" xml:space="preserve">
164212
<value>Set the tile properties</value>
165213
</data>
214+
<data name="SettingsAboutTextBlock.Text" xml:space="preserve">
215+
<value>About</value>
216+
</data>
217+
<data name="SettingsAppNameTextBlock.Text" xml:space="preserve">
218+
<value>Yugen Mosaic</value>
219+
</data>
220+
<data name="SettingsDevelopedHyperlink.Content" xml:space="preserve">
221+
<value />
222+
</data>
223+
<data name="SettingsDevelopedHyperlink.NavigateUri" xml:space="preserve">
224+
<value>http://www.yugenapps.com</value>
225+
</data>
226+
<data name="SettingsDevelopedTextBlock.Text" xml:space="preserve">
227+
<value>Developed By</value>
228+
</data>
229+
<data name="SettingsIconHyperlink.Content" xml:space="preserve">
230+
<value>Yoshi</value>
231+
</data>
232+
<data name="SettingsIconHyperlink.NavigateUri" xml:space="preserve">
233+
<value>https://github.com/yoshiask</value>
234+
</data>
235+
<data name="SettingsIconTextBlock.Text" xml:space="preserve">
236+
<value>Icon</value>
237+
</data>
238+
<data name="SettingsRateHyperlink.Content" xml:space="preserve">
239+
<value>Rate and review</value>
240+
</data>
241+
<data name="SettingsThemeDarkTextBlock.Content" xml:space="preserve">
242+
<value>Dark</value>
243+
</data>
244+
<data name="SettingsThemeDefaultTextBlock.Content" xml:space="preserve">
245+
<value>System Default</value>
246+
</data>
247+
<data name="SettingsThemeLightTextBlock.Content" xml:space="preserve">
248+
<value>Light</value>
249+
</data>
250+
<data name="SettingsThemeTextBlock.Text" xml:space="preserve">
251+
<value>Theme</value>
252+
</data>
253+
<data name="SettingsTitleTextBlock.Text" xml:space="preserve">
254+
<value>Settings</value>
255+
</data>
256+
<data name="SettingsUIHyperlink.Content" xml:space="preserve">
257+
<value>Leisvan</value>
258+
</data>
259+
<data name="SettingsUIHyperlink.NavigateUri" xml:space="preserve">
260+
<value>https://twitter.com/leisvanCT</value>
261+
</data>
262+
<data name="SettingsUITextBlock.Text" xml:space="preserve">
263+
<value>UI</value>
264+
</data>
166265
</root>

Yugen.Mosaic.Uwp/ViewModels/SettingsViewModel.cs

+2-11
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,21 @@ namespace Yugen.Mosaic.Uwp.ViewModels
1313
{
1414
public class SettingsViewModel : BaseViewModel
1515
{
16-
private const string STORE_REVIEWFORMAT = "ms-windows-store:REVIEW?PFN={0}";
1716
private ElementTheme _elementTheme = ThemeSelectorService.Theme;
18-
private ICommand _launchRateAndReviewCommand;
1917
private ICommand _switchThemeCommand;
20-
//This may change if the app gets localized
21-
public string AppName => "Yugen Mosaic";
2218

2319
public string AppVersion => SystemHelper.AppVersion;
24-
25-
public string[] Collaborator => new[] { "Leisvan", "Yoshi" };
20+
public string Publisher => SystemHelper.Publisher;
21+
public string RateAndReviewUri => $"ms-windows-store:REVIEW?PFN={Package.Current.Id.FamilyName}";
2622

2723
public ElementTheme ElementTheme
2824
{
2925
get => _elementTheme;
3026
set => Set(ref _elementTheme, value);
3127
}
3228

33-
public string Publisher => SystemHelper.Publisher;
34-
35-
public ICommand LaunchRateAndReviewCommand => _launchRateAndReviewCommand ?? (_launchRateAndReviewCommand = new AsyncRelayCommand(LaunchRateAndReviewCommandBehavior));
3629
public ICommand SwitchThemeCommand => _switchThemeCommand ?? (_switchThemeCommand = new AsyncRelayCommand<ElementTheme>(SwitchThemeCommandBehavior));
3730

38-
private async Task LaunchRateAndReviewCommandBehavior() => await Launcher.LaunchUriAsync(new Uri(string.Format(STORE_REVIEWFORMAT, Package.Current.Id.FamilyName)));
39-
4031
private async Task SwitchThemeCommandBehavior(ElementTheme param)
4132
{
4233
ElementTheme = param;

0 commit comments

Comments
 (0)