Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Settings (user preferences) menu #98

Merged
merged 7 commits into from
Nov 30, 2020
Merged

Added Settings (user preferences) menu #98

merged 7 commits into from
Nov 30, 2020

Conversation

flabbet
Copy link
Member

@flabbet flabbet commented Nov 30, 2020

Added Settings menu in File -> Settings with settings:

  • Default new file size
  • Check updates on startup
  • Show New File dialog on startup

Of course, added user_preferences.json reader and writer. The file is stored under AppData\Local\PixiEditor\user_preferences.json

@flabbet flabbet added the enhancement New feature or request label Nov 30, 2020
@flabbet flabbet requested a review from CPKreu November 30, 2020 12:14
@flabbet flabbet added this to In progress in v1.0 via automation Nov 30, 2020
@flabbet flabbet changed the title Added Settings menu Added Settings (user preferences) menu Nov 30, 2020
@@ -83,6 +83,8 @@
Command="{Binding FileSubViewModel.SaveDocumentCommand}" CommandParameter="AsNew" />
<MenuItem Header="_Export" InputGestureText="Ctrl+Shift+Alt+S" Command="{Binding FileSubViewModel.ExportFileCommand}" />
<Separator />
<MenuItem Header="_Settings" Command="{Binding MiscSubViewModel.OpenSettingsWindowCommand}" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect it to be in the Edit tab

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about that, some software has this in File some in Edit. Not sure which one should we use.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I moved it to Edit

Executed="CommandBinding_Executed_Close" />
</Window.CommandBindings>

<Grid Background="{StaticResource AccentColor}">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might look better if you switch the colors

Suggested change
<Grid Background="{StaticResource AccentColor}">
<Grid Background="{StaticResource MainColor}">

<Button Style="{StaticResource DarkRoundButton}" Margin="10 5 10 5"
Command="{Binding SelectCategoryCommand}" CommandParameter="Updates">Updates</Button>
</StackPanel>
<Grid Grid.Row="1" Grid.Column="1" Background="{StaticResource MainColor}">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<Grid Grid.Row="1" Grid.Column="1" Background="{StaticResource MainColor}">
<Grid Grid.Row="1" Grid.Column="1" Background="{StaticResource AccentColor}">

@flabbet flabbet requested a review from CPKreu November 30, 2020 15:06
@codecov-io
Copy link

Codecov Report

Merging #98 (bd303b5) into master (746b498) will decrease coverage by 0.00%.
The diff coverage is 38.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #98      +/-   ##
==========================================
- Coverage   52.31%   52.30%   -0.01%     
==========================================
  Files         179      186       +7     
  Lines        6354     6504     +150     
  Branches      559      570      +11     
==========================================
+ Hits         3324     3402      +78     
- Misses       2916     2983      +67     
- Partials      114      119       +5     
Impacted Files Coverage Δ
...rs/Converters/EqualityBoolToVisibilityConverter.cs 0.00% <0.00%> (ø)
PixiEditor/Models/Dialogs/NewFileDialog.cs 0.00% <0.00%> (ø)
PixiEditor/Properties/Settings.Designer.cs 0.00% <ø> (ø)
PixiEditor/ViewModels/NewFileMenuViewModel.cs 0.00% <0.00%> (ø)
PixiEditor/ViewModels/SettingsWindowViewModel.cs 0.00% <0.00%> (ø)
...tor/ViewModels/SubViewModels/Main/FileViewModel.cs 20.66% <0.00%> (-0.53%) ⬇️
...r/ViewModels/SubViewModels/Main/UpdateViewModel.cs 24.65% <0.00%> (-0.70%) ⬇️
...SubViewModels/UserPreferences/SettingsViewModel.cs 0.00% <0.00%> (ø)
PixiEditor/Views/Dialogs/NewFilePopup.xaml.cs 0.00% <0.00%> (ø)
PixiEditor/Views/Dialogs/SettingsWindow.xaml 0.00% <0.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 746b498...bd303b5. Read the comment docs.

@flabbet flabbet merged commit 09049f9 into master Nov 30, 2020
v1.0 automation moved this from In progress to Done Nov 30, 2020
@Equbuxu Equbuxu deleted the settings-menu branch March 13, 2021 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
v1.0
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants