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

UI updates #99

Merged
merged 32 commits into from
Mar 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
a404822
Fixed problem when remove clipboard listener operation fails.
Tum4ik Feb 13, 2024
ecf68a6
to .NET 8
Tum4ik Feb 13, 2024
164ff55
prev vstest
Tum4ik Feb 13, 2024
3c04a7f
improved test step
Tum4ik Feb 14, 2024
2714fab
test step at the beginning of the workflow
Tum4ik Feb 14, 2024
a20a2da
Window style for Win 11
Tum4ik Feb 15, 2024
dfc9aac
WinUI 3 backdrop for main window.
Tum4ik Feb 18, 2024
5a9d394
release notes
Tum4ik Feb 18, 2024
6fff6d7
Fixed border when window is maximized
Tum4ik Feb 19, 2024
aa52268
window helper
Tum4ik Feb 20, 2024
cfa4ece
Spinner for NumbeBox
Tum4ik Feb 24, 2024
b85247b
Improved titlebar behavior
Tum4ik Feb 24, 2024
92e9bfb
Toggle switch improvement
Tum4ik Feb 24, 2024
7304090
App bar buttons instead tab buttons.
Tum4ik Feb 25, 2024
e487774
SettingCard
Tum4ik Feb 29, 2024
487e85b
Release notes.
Tum4ik Mar 10, 2024
9d9ad23
Text plugin text trimming
Tum4ik Mar 10, 2024
452734c
Focus search box on paste window appears.
Tum4ik Mar 10, 2024
1c3512c
Paste window resize
Tum4ik Mar 13, 2024
81bbe68
Disable paste window controls if settings mode is enabled.
Tum4ik Mar 15, 2024
b23f5d7
Removed bad margin for accent button.
Tum4ik Mar 15, 2024
e54d243
Removed event to listen for paste window input.
Tum4ik Mar 18, 2024
c933bf7
Save paste window size settings.
Tum4ik Mar 19, 2024
b3d8381
Paste window width and height in settings.
Tum4ik Mar 20, 2024
dd69868
Description for paste window settings.
Tum4ik Mar 20, 2024
55f34c9
Min paste window size.
Tum4ik Mar 21, 2024
e30eb2b
Update paste window size if paste window and settings window are both…
Tum4ik Mar 21, 2024
cd8b169
Slider
Tum4ik Mar 25, 2024
300e9a4
Paste window opacity.
Tum4ik Mar 27, 2024
a906137
Remove window titlebar depending on platform.
Tum4ik Mar 28, 2024
3fd6a57
Fixed plugin dev kit path for build workflow.
Tum4ik Mar 29, 2024
8af24aa
fixed .net version
Tum4ik Mar 29, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ dotnet_diagnostic.CA1062.severity = none
dotnet_diagnostic.CS1591.severity = none

dotnet_diagnostic.S1186.severity = none
dotnet_diagnostic.S1121.severity = none
dotnet_diagnostic.S3885.severity = none
dotnet_diagnostic.S4200.severity = none
dotnet_diagnostic.S6602.severity = none
Expand Down
59 changes: 36 additions & 23 deletions .github/workflows/gated_application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,28 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0

- name: Setup MSBuild
uses: microsoft/[email protected]
uses: microsoft/setup-msbuild@v2

- name: Test
run: |
$vswherePath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe"
$vsInstallationPath = & $vswherePath `
-latest `
-products * `
-requires Microsoft.VisualStudio.Workload.ManagedDesktop Microsoft.VisualStudio.Workload.Web `
-requiresAny `
-property installationPath
$vstestPath = Join-Path $vsInstallationPath "Common7\IDE\CommonExtensions\Microsoft\TestWindow\vstest.console.exe"
msbuild /t:Restore /t:Build /p:Configuration=Release
& $vstestPath .\Tests\*.UnitTests\bin\Release\*\*.UnitTests.dll `
/Parallel `
/Enablecodecoverage `
/Collect:"Code Coverage;Format=Cobertura"

- name: Define version
id: define-version
Expand All @@ -104,19 +120,8 @@ jobs:
${{ env.Scripts }}\MSBuildPublish.ps1 -Architecture x86 -Version $version
${{ env.Scripts }}\MSBuildPublish.ps1 -Architecture x64 -Version $version

- name: Setup VSTest.console.exe
uses: darenm/[email protected]

- name: Test
run: |
msbuild /t:Restore /t:Build /p:Configuration=Release
vstest.console.exe .\Tests\*.UnitTests\bin\Release\*\*.UnitTests.dll `
/Parallel `
/Enablecodecoverage `
/Collect:"Code Coverage;Format=Cobertura"

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4.0.1

- name: Prepare PFX fil for code signing
run: |
Expand Down Expand Up @@ -159,7 +164,7 @@ jobs:
run: Remove-Item -Path ${{ env.TemporaryPfxFilePath }}

- name: Upload build artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4.3.1
with:
if-no-files-found: error
name: BuildFiles
Expand All @@ -177,13 +182,21 @@ jobs:

steps:
- name: Download build artifacts
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.2

- name: GitHub release
uses: softprops/[email protected]
with:
tag_name: ${{ needs.build.outputs.version }}
draft: true
files: '**/*.exe'
body_path: BuildFiles/ReleaseNotes.md
fail_on_unmatched_files: true
env:
GH_REPO: ${{ github.repository }}
GITHUB_TOKEN: ${{ github.token }}
run: |
gh release create ${{ needs.build.outputs.version }} '**/*.exe' `
--draft `
--title ${{ needs.build.outputs.version }} `
--notes-file BuildFiles/ReleaseNotes.md
# uses: softprops/[email protected]
# with:
# tag_name: ${{ needs.build.outputs.version }}
# draft: true
# files: '**/*.exe'
# body_path: BuildFiles/ReleaseNotes.md
# fail_on_unmatched_files: true
24 changes: 12 additions & 12 deletions .github/workflows/gated_plugin-dev-kit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ on:
branches:
- 'release/**'
paths:
- 'Plugins/Tum4ik.JustClipboardManager.PluginsDevKit/**'
- 'Plugins/Tum4ik.JustClipboardManager.PluginDevKit/**'
pull_request:
branches:
- 'main'
- 'release/**'
paths:
- 'Plugins/Tum4ik.JustClipboardManager.PluginsDevKit/**'
- 'Plugins/Tum4ik.JustClipboardManager.PluginDevKit/**'


jobs:
Expand All @@ -27,19 +27,19 @@ jobs:
env:
Scripts: .\.github\workflows\scripts
TemporaryPfxFilePath: .\GitHubActionsWorkflow.pfx
BuildOutputPath: .\Plugins\Tum4ik.JustClipboardManager.PluginsDevKit\bin\Release\net7.0-windows
PackOutputPath: .\Plugins\Tum4ik.JustClipboardManager.PluginsDevKit\bin\Release\pack
BuildOutputPath: .\Plugins\Tum4ik.JustClipboardManager.PluginDevKit\bin\Release\net8.0-windows
PackOutputPath: .\Plugins\Tum4ik.JustClipboardManager.PluginDevKit\bin\Release\pack

steps:
- name: Checkout
uses: actions/checkout@v4.0.0
uses: actions/checkout@v4.1.1
with:
fetch-depth: 0

- name: Install .NET
uses: actions/setup-dotnet@v3.2.0
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4.0.0
with:
dotnet-version: 7.0.x
dotnet-version: 8.0.x

- name: Define version
id: define-version
Expand All @@ -54,7 +54,7 @@ jobs:
- name: Build
run: |
$version = "${{ steps.define-version.outputs.version }}"
dotnet build ./Plugins/Tum4ik.JustClipboardManager.PluginsDevKit/Tum4ik.JustClipboardManager.PluginDevKit.csproj `
dotnet build ./Plugins/Tum4ik.JustClipboardManager.PluginDevKit/Tum4ik.JustClipboardManager.PluginDevKit.csproj `
-c Release `
--nologo `
/p:PackageVersion=$version `
Expand All @@ -78,7 +78,7 @@ jobs:
- name: Pack
run: |
$version = "${{ steps.define-version.outputs.version }}"
dotnet pack ./Plugins/Tum4ik.JustClipboardManager.PluginsDevKit/Tum4ik.JustClipboardManager.PluginDevKit.csproj `
dotnet pack ./Plugins/Tum4ik.JustClipboardManager.PluginDevKit/Tum4ik.JustClipboardManager.PluginDevKit.csproj `
-c Release `
--nologo `
--no-build `
Expand All @@ -89,7 +89,7 @@ jobs:
/p:SymbolPackageFormat=snupkg

- name: Upload build artifacts
uses: actions/upload-artifact@v3.1.2
uses: actions/upload-artifact@v4.3.1
with:
if-no-files-found: error
name: Package
Expand All @@ -105,7 +105,7 @@ jobs:

steps:
- name: Download build artifacts
uses: actions/download-artifact@v3.0.2
uses: actions/download-artifact@v4.1.2

- name: NuGet push
run: |
Expand Down
2 changes: 1 addition & 1 deletion JustClipboardManager.sln
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tum4ik.JustClipboardManager
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Plugins", "Plugins", "{82637701-F680-4526-ACD7-01E54950444E}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tum4ik.JustClipboardManager.PluginDevKit", "Plugins\Tum4ik.JustClipboardManager.PluginsDevKit\Tum4ik.JustClipboardManager.PluginDevKit.csproj", "{877793B0-8BB2-4F06-B8FA-39B95D5C8F0F}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tum4ik.JustClipboardManager.PluginDevKit", "Plugins\Tum4ik.JustClipboardManager.PluginDevKit\Tum4ik.JustClipboardManager.PluginDevKit.csproj", "{877793B0-8BB2-4F06-B8FA-39B95D5C8F0F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Tum4ik.JustClipboardManager.TextPlugin", "Plugins\Tum4ik.JustClipboardManager.TextPlugin\Tum4ik.JustClipboardManager.TextPlugin.csproj", "{6DA0F318-A17F-4518-A324-423E5236ECB9}"
EndProject
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public static class AppColors
public const string CheckBoxHoverBackgroundBrush = nameof(CheckBoxHoverBackgroundBrush);
public const string CheckBoxPressedBackgroundBrush = nameof(CheckBoxPressedBackgroundBrush);
public const string CheckBoxDisabledBorderBrush = nameof(CheckBoxDisabledBorderBrush);
public const string SliderThumbBackgroundBrush = nameof(SliderThumbBackgroundBrush);
public const string SliderTrackBackgroundBrush = nameof(SliderTrackBackgroundBrush);
public const string SliderTrackDisabledBackgroundBrush = nameof(SliderTrackDisabledBackgroundBrush);
public const string TextBoxBorderBrush = nameof(TextBoxBorderBrush);
public const string TextBoxBorderUnderlineBrush = nameof(TextBoxBorderUnderlineBrush);
public const string TextBoxInputActiveBackgroundBrush = nameof(TextBoxInputActiveBackgroundBrush);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
mc:Ignorable="d"
Height="26" ToolTip="{Binding RepresentationData}">
<TextBlock Text="{Binding ToolTip, RelativeSource={RelativeSource AncestorType=Border}}"
Margin="0, 4"/>
<TextBlock Text="{Binding RepresentationData}"
Margin="0, 4"
TextTrimming="CharacterEllipsis"/>
</Border>
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UseWPF>true</UseWPF>
Expand All @@ -10,11 +10,11 @@
</PropertyGroup>

<ItemGroup>
<ProjectReference Include="..\Tum4ik.JustClipboardManager.PluginsDevKit\Tum4ik.JustClipboardManager.PluginDevKit.csproj" />
<ProjectReference Include="..\Tum4ik.JustClipboardManager.PluginDevKit\Tum4ik.JustClipboardManager.PluginDevKit.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.7.30">
<PackageReference Include="Microsoft.VisualStudio.Threading.Analyzers" Version="17.9.28">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
14 changes: 6 additions & 8 deletions ReleaseNotes.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
### Features
* Plugins support.
* Keep user settings from the previous version of the application after upgrade.
* Automatic restart on application crash.
* "Remove clips older than..." setting.
* Paste window settings.
* Possibility to use WinUI 3 Mica backdrop window style (Windows 11 only).
* UI improvements.
* Paste window size and opacity settings.
* Possibility to configure paste window size and opacity directly.

### Fixes
* Fixed problem when the application breaks the clipboard viewer chain on exit.
* Fixed Main window bottom corners rounding when the window is maximized (#72).
* Fixed Main window shadow after restoring the window state (#73).
* Fixed problem when remove clipboard listener operation fails.
* Fixed accent button strange margin.
2 changes: 1 addition & 1 deletion SolutionProperties/Copyright.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
© 2022-2023 Yevheniy Tymchishin. All rights reserved.
© 2022-2024 Yevheniy Tymchishin. All rights reserved.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ internal async Task HwndHook_ManySequentialClipboardUpdateMsgs_PublishesClipboar


[Fact]
internal void HwndHook_DestroyMsg_RemovesClipboardListener()
internal void HwndHook_CloseMsg_RemovesClipboardListener()
{
const nint WinHandle = 33;
_pasteWindowService.WindowHandle.Returns(WinHandle);
Expand All @@ -78,7 +78,7 @@ internal void HwndHook_DestroyMsg_RemovesClipboardListener()
var testeeService = new ClipboardHookService(_pasteWindowService, _eventAggregator, _user32Dll);

var handled = false;
testeeService.HwndHook(WinHandle, 0x0002, default, default, ref handled);
testeeService.HwndHook(WinHandle, 0x0010, default, default, ref handled);

_user32Dll.Received(1).RemoveClipboardFormatListener(WinHandle);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net7.0-windows</TargetFramework>
<TargetFramework>net8.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<IsPackable>false</IsPackable>
Expand Down
15 changes: 15 additions & 0 deletions Tum4ik.JustClipboardManager/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,21 @@
<setting name="DisplayCorner" serializeAs="String">
<value>0</value>
</setting>
<setting name="Width" serializeAs="String">
<value>420</value>
</setting>
<setting name="Height" serializeAs="String">
<value>300</value>
</setting>
<setting name="MinWidth" serializeAs="String">
<value>200</value>
</setting>
<setting name="MinHeight" serializeAs="String">
<value>118</value>
</setting>
<setting name="Opacity" serializeAs="String">
<value>1</value>
</setting>
</Tum4ik.JustClipboardManager.Properties.SettingsPasteWindow>
<Tum4ik.JustClipboardManager.Properties.PluginSettings>
<setting name="Dummy" serializeAs="String">
Expand Down
3 changes: 2 additions & 1 deletion Tum4ik.JustClipboardManager/App.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<d:ResourceDictionary Source="Themes/LightTheme.xaml"/>
<ResourceDictionary Source="Styles/GeneralStyles.xaml"/>
<ResourceDictionary Source="Styles/GeneralStyles.xaml"/>
<ResourceDictionary Source="Controls/SettingCard/SettingCard.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</Application.Resources>
Expand Down
12 changes: 10 additions & 2 deletions Tum4ik.JustClipboardManager/App.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,8 @@ private static void OnUnhandledException(object? sender, DispatcherUnhandledExce
{
{ "Message", "Unhandled Exception" },
{ "OS Architecture", Environment.Is64BitOperatingSystem ? "x64" : "x86" },
{ "App Architecture", Environment.Is64BitProcess ? "x64" : "x86" }
{ "App Architecture", Environment.Is64BitProcess ? "x64" : "x86" },
{ "OS Version", Environment.OSVersion.Version.ToString() }
});
Task.Delay(10000).Wait(); // Give Crashes some time to be able to record exception properly
e.Handled = true;
Expand Down Expand Up @@ -292,7 +293,14 @@ protected override void RegisterTypes(IContainerRegistry containerRegistry)
.RegisterShell<TrayIcon, TrayIconViewModel>()
.RegisterShell<PasteWindow, PasteWindowViewModel>();

containerRegistry.RegisterDialogWindow<MainDialogWindow>(WindowNames.MainAppWindow);
if (Environment.OSVersion.Version >= Version.Parse("10.0.22000"))
{
containerRegistry.RegisterDialogWindow<MainDialogWindow>(WindowNames.MainAppWindow);
}
else
{
containerRegistry.RegisterDialogWindow<MainDialogBefore11Window>(WindowNames.MainAppWindow);
}
containerRegistry.RegisterDialogWindow<SimpleDialogWindow>(WindowNames.SimpleDialogWindow);
containerRegistry.RegisterSingleInstanceDialog<MainDialog, MainDialogViewModel>(DialogNames.MainDialog);
containerRegistry.RegisterDialog<UnregisteredHotkeysDialog, UnregisteredHotkeysDialogViewModel>(DialogNames.UnregisteredHotkeysDialog);
Expand Down
Loading
Loading