Skip to content

Commit

Permalink
Merge branch 'WXRIW:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
NetheriteBowl authored Aug 1, 2024
2 parents 9fcbe9b + e481b84 commit 587ea12
Show file tree
Hide file tree
Showing 11 changed files with 221 additions and 114 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Upstream Sync

permissions:
contents: write

on:
schedule:
- cron: "0 0 * * *" # every day
workflow_dispatch:

jobs:
sync_latest_from_upstream:
name: Sync latest commits from upstream repo
runs-on: ubuntu-latest
if: github.repository == 'InkCanvas/Ink-Canvas'

steps:
# Step 1: run a standard checkout action
- name: Checkout target repo
uses: actions/checkout@v3

# Step 2: run the sync action
- name: Sync upstream changes
id: sync
uses: aormsby/[email protected]
with:
upstream_sync_repo: WXRIW/Ink-Canvas
upstream_sync_branch: master
target_sync_branch: master
target_repo_token: ${{ secrets.GITHUB_TOKEN }} # automatically generated, no need to set

# Set test_mode true to run tests instead of the true action!!
test_mode: false

- name: Sync check
if: failure()
run: |
echo "[Error] Due to a change in the workflow file of the upstream repository, GitHub has automatically suspended the scheduled automatic update. You need to manually sync your fork."
echo "[错误] 由于上游仓库的工作流文件更改,GitHub 已自动暂停计划的自动更新。您需要手动同步您的分支。"
exit 1
2 changes: 1 addition & 1 deletion Ink Canvas Packaging/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Identity
Name="63265WXRIW.9875F4656CA2"
Publisher="CN=FD2EEB64-9B3F-4B12-B833-80497D4F956C"
Version="3.7.2.0" />
Version="4.0.0.0" />

<Properties>
<DisplayName>Ink Canvas</DisplayName>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
<AppxBundlePlatforms>arm64</AppxBundlePlatforms>
<HoursBetweenUpdateChecks>0</HoursBetweenUpdateChecks>
<EntryPointProjectUniqueName>..\Ink Canvas\Ink Canvas.csproj</EntryPointProjectUniqueName>
<AppxPackageSigningTimestampDigestAlgorithm>SHA256</AppxPackageSigningTimestampDigestAlgorithm>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<DefaultLanguage>zh-cn</DefaultLanguage>
Expand Down
2 changes: 1 addition & 1 deletion Ink Canvas for ARM Packaging/Package.appxmanifest
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<Identity
Name="63265WXRIW.InkCanvasforARM"
Publisher="CN=FD2EEB64-9B3F-4B12-B833-80497D4F956C"
Version="3.7.2.0" />
Version="4.0.0.0" />

<Properties>
<DisplayName>Ink Canvas for ARM</DisplayName>
Expand Down
6 changes: 3 additions & 3 deletions Ink Canvas/Helpers/TimeMachine.cs
Original file line number Diff line number Diff line change
Expand Up @@ -151,12 +151,12 @@ public TimeMachineHistory(StrokeCollection currentStroke, TimeMachineHistoryType
StrokeHasBeenCleared = strokeHasBeenCleared;
ReplacedStroke = replacedStroke;
}
public TimeMachineHistory(Dictionary<Stroke, Tuple<StylusPointCollection,StylusPointCollection>> stylusPointDictionary, TimeMachineHistoryType commitType)
public TimeMachineHistory(Dictionary<Stroke, Tuple<StylusPointCollection, StylusPointCollection>> stylusPointDictionary, TimeMachineHistoryType commitType)
{
CommitType=commitType;
CommitType = commitType;
StylusPointDictionary = stylusPointDictionary;
}
public TimeMachineHistory(Dictionary<Stroke, Tuple<DrawingAttributes,DrawingAttributes>> drawingAttributes, TimeMachineHistoryType commitType)
public TimeMachineHistory(Dictionary<Stroke, Tuple<DrawingAttributes, DrawingAttributes>> drawingAttributes, TimeMachineHistoryType commitType)
{
CommitType = commitType;
DrawingAttributes = drawingAttributes;
Expand Down
31 changes: 18 additions & 13 deletions Ink Canvas/MainWindow.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@
</GroupBox>
<GroupBox Header="手势">
<ui:SimpleStackPanel Spacing="12">
<ui:ToggleSwitch Name="ToggleSwitchDisableLockSmithByDefault" Header="默认启用双指手势" FontFamily="Microsoft YaHei UI" IsOn="True" OnContent="" OffContent="" Toggled="ToggleSwitchDisableLockSmithByDefault_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchEnableTwoFingerZoom" Header="允许双指缩放" FontFamily="Microsoft YaHei UI" IsOn="True" OnContent="" OffContent="" Toggled="ToggleSwitchEnableTwoFingerZoom_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchEnableTwoFingerTranslate" Header="允许双指移动" FontFamily="Microsoft YaHei UI" IsOn="True" OnContent="" OffContent="" Toggled="ToggleSwitchEnableTwoFingerTranslate_Toggled"/>
<ui:ToggleSwitch Name="ToggleSwitchEnableTwoFingerRotation" Header="允许双指旋转" FontFamily="Microsoft YaHei UI" OnContent="" OffContent="" Toggled="ToggleSwitchEnableTwoFingerRotation_Toggled"/>
Expand Down Expand Up @@ -701,7 +702,7 @@
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
Height="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
Click="BtnColorBlack_Click">
<Viewbox Name="ViewboxBtnColorBlackContent" Visibility="Collapsed">
<Viewbox Name="ViewboxBtnColorBlackContent" Opacity="0">
<ui:SymbolIcon Symbol="Accept" Name="SymbolIconBtnColorBlackContent" Foreground="White"/>
</Viewbox>
</Button>
Expand All @@ -717,23 +718,23 @@
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
Height="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
Click="BtnColorGreen_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}">
<Viewbox Name="ViewboxBtnColorGreenContent" Visibility="Collapsed">
<Viewbox Name="ViewboxBtnColorGreenContent" Opacity="0">
<ui:SymbolIcon Symbol="Accept" Foreground="{Binding ElementName=SymbolIconBtnColorBlackContent, Path=Foreground}"/>
</Viewbox>
</Button>
<Button Name="BtnColorBlue" FontFamily="Microsoft YaHei UI" Background="#239AD6"
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
Height="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
Click="BtnColorBlue_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}">
<Viewbox Name="ViewboxBtnColorBlueContent" Visibility="Collapsed">
<Viewbox Name="ViewboxBtnColorBlueContent" Opacity="0">
<ui:SymbolIcon Symbol="Accept" Foreground="{Binding ElementName=SymbolIconBtnColorBlackContent, Path=Foreground}"/>
</Viewbox>
</Button>
<Button Name="BtnColorYellow" FontFamily="Microsoft YaHei UI" Background="#F38B00"
Margin="0,10,0,0" Width="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
Height="{Binding ElementName=StackPanelColors, Path=ActualWidth}"
Click="BtnColorYellow_Click" Foreground="{Binding ElementName=BtnExit, Path=Foreground}">
<Viewbox Name="ViewboxBtnColorYellowContent" Visibility="Collapsed">
<Viewbox Name="ViewboxBtnColorYellowContent" Opacity="0">
<ui:SymbolIcon Symbol="Accept" Foreground="{Binding ElementName=SymbolIconBtnColorBlackContent, Path=Foreground}"/>
</Viewbox>
</Button>
Expand Down Expand Up @@ -964,6 +965,9 @@
</ui:SimpleStackPanel>
</Border>
<Border Margin="5,0,0,0" Visibility="Visible" Height="36" Name="BorderFloatingBarMainControls" Background="{DynamicResource FloatBarBackground}" CornerRadius="5" BorderThickness="1" BorderBrush="{DynamicResource FloatBarBorderBrush}">
<Border.RenderTransform>
<ScaleTransform />
</Border.RenderTransform>
<ui:SimpleStackPanel Name="StackPanelFloatingBar" Spacing="10" Orientation="Horizontal">
<ui:SimpleStackPanel Name="StackPanelCanvacMain" Margin="10,5,0,5" Spacing="10" Orientation="{Binding ElementName=StackPanelFloatingBar, Path=Orientation}">
<Grid Height="24" Width="0">
Expand All @@ -980,37 +984,37 @@
<ui:SimpleStackPanel Orientation="{Binding ElementName=StackPanelFloatingBar, Path=Orientation}" Spacing="8" Margin="0,1">
<Border Name="BorderPenColorBlack" Background="{Binding ElementName=BtnColorBlack, Path=Background}" MouseUp="BorderPenColorBlack_MouseUp" CornerRadius="100"
Width="{Binding ElementName=BorderPenColorBlack, Path=ActualHeight}">
<Viewbox Visibility="{Binding ElementName=ViewboxBtnColorBlackContent, Path=Visibility}" Margin="6">
<Viewbox Opacity="{Binding ElementName=ViewboxBtnColorBlackContent, Path=Opacity}" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="White"/>
</Viewbox>
</Border>
<Border Name="BorderPenColorRed" Background="{Binding ElementName=BtnColorRed, Path=Background}" MouseUp="BorderPenColorRed_MouseUp" CornerRadius="100"
Width="{Binding ElementName=BorderPenColorRed, Path=ActualHeight}">
<Viewbox Visibility="{Binding ElementName=ViewboxBtnColorRedContent, Path=Visibility}" Margin="6">
<Viewbox Opacity="{Binding ElementName=ViewboxBtnColorRedContent, Path=Opacity}" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="White"/>
</Viewbox>
</Border>
<Border Name="BorderPenColorGreen" Background="{Binding ElementName=BtnColorGreen, Path=Background}" MouseUp="BorderPenColorGreen_MouseUp" CornerRadius="100"
Width="{Binding ElementName=BorderPenColorGreen, Path=ActualHeight}">
<Viewbox Visibility="{Binding ElementName=ViewboxBtnColorGreenContent, Path=Visibility}" Margin="6">
<Viewbox Opacity="{Binding ElementName=ViewboxBtnColorGreenContent, Path=Opacity}" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="White"/>
</Viewbox>
</Border>
<Border Name="BorderPenColorBlue" Background="{Binding ElementName=BtnColorBlue, Path=Background}" MouseUp="BorderPenColorBlue_MouseUp" CornerRadius="100"
Width="{Binding ElementName=BorderPenColorBlue, Path=ActualHeight}">
<Viewbox Visibility="{Binding ElementName=ViewboxBtnColorBlueContent, Path=Visibility}" Margin="6">
<Viewbox Opacity="{Binding ElementName=ViewboxBtnColorBlueContent, Path=Opacity}" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="White"/>
</Viewbox>
</Border>
<Border Name="BorderPenColorYellow" Background="{Binding ElementName=BtnColorYellow, Path=Background}" MouseUp="BorderPenColorYellow_MouseUp" CornerRadius="100"
Width="{Binding ElementName=BorderPenColorYellow, Path=ActualHeight}">
<Viewbox Visibility="{Binding ElementName=ViewboxBtnColorYellowContent, Path=Visibility}" Margin="6">
<Viewbox Opacity="{Binding ElementName=ViewboxBtnColorYellowContent, Path=Opacity}" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="White"/>
</Viewbox>
</Border>
<Border Name="BorderPenColorWhite" Background="White" CornerRadius="100" MouseUp="BorderPenColorWhite_MouseUp"
Width="{Binding ElementName=BorderPenColorYellow, Path=ActualHeight}">
<Viewbox Name="ViewboxBtnColorWhiteContent" Visibility="Collapsed" Margin="6">
<Viewbox Name="ViewboxBtnColorWhiteContent" Opacity="0" Margin="6">
<ui:SymbolIcon Symbol="Accept" Foreground="Black"/>
</Viewbox>
</Border>
Expand Down Expand Up @@ -1205,15 +1209,16 @@
HorizontalAlignment="Left" Margin="8,8"/>
<Viewbox Margin="12,0,0,0" Height="38" Width="100" HorizontalAlignment="Left" VerticalAlignment="Top">
<ui:SimpleStackPanel>
<Label Margin="0,0,0,-2" Content="画笔粗细" Foreground="{DynamicResource ToolBarForeground}" FontSize="13" VerticalAlignment="Center"/>
<Label Margin="0,0,0,-2" Content="画笔粗细" Foreground="{DynamicResource FloatBarForeground}" FontSize="13" VerticalAlignment="Center"/>
<StackPanel Orientation="Horizontal">
<Slider HorizontalAlignment="Left"
Minimum="1" Maximum="20"
Width="100"
Width="102"
IsSnapToTickEnabled="True" Value="{Binding ElementName=InkWidthSlider, Path=Value, Mode=TwoWay}"
TickFrequency="1" TickPlacement="Both"/>
<TextBlock Text="{Binding Value, ElementName=InkWidthSlider, Mode=OneWay}"
VerticalAlignment="Bottom" Margin="10,0,0,8"
Foreground="{DynamicResource FloatBarForeground}"
VerticalAlignment="Bottom" Margin="6,0,0,8"
Width="15" FontSize="13"/>
</StackPanel>
</ui:SimpleStackPanel>
Expand Down
Loading

0 comments on commit 587ea12

Please sign in to comment.