Skip to content

Commit

Permalink
✨ 复制粘贴高度锁定纵横比
Browse files Browse the repository at this point in the history
  • Loading branch information
Achuan-2 committed Jan 23, 2025
1 parent 17d8038 commit f7ccc74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SlideSCI/Ribbon1.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions SlideSCI/Ribbon1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ private void pasteImgWidth_Click(object sender, RibbonControlEventArgs e)
{
foreach (PowerPoint.Shape shape in sel.ShapeRange)
{
shape.LockAspectRatio = Office.MsoTriState.msoTrue; // Lock aspect ratio
shape.Width = copiedWidth;
}
}
Expand Down Expand Up @@ -186,6 +187,7 @@ private void pasteImgHeight_Click(object sender, RibbonControlEventArgs e)
{
foreach (PowerPoint.Shape shape in sel.ShapeRange)
{
shape.LockAspectRatio = Office.MsoTriState.msoTrue; // Lock aspect ratio
shape.Height = copiedHeight;
}
}
Expand Down

0 comments on commit f7ccc74

Please sign in to comment.