Better visibility at Presentation
This commit is contained in:
parent
b747f5cbee
commit
df44a12a62
@ -7,7 +7,7 @@
|
|||||||
AllowsTransparency="True" WindowStyle="None" ResizeMode="NoResize"
|
AllowsTransparency="True" WindowStyle="None" ResizeMode="NoResize"
|
||||||
mc:Ignorable="d" WindowState="Maximized" Loaded="Window_Loaded" Background="Transparent" ShowInTaskbar="False"
|
mc:Ignorable="d" WindowState="Maximized" Loaded="Window_Loaded" Background="Transparent" ShowInTaskbar="False"
|
||||||
Title="MainWindow" Height="1000" Width="800" FontFamily="Microsoft YaHei UI"
|
Title="MainWindow" Height="1000" Width="800" FontFamily="Microsoft YaHei UI"
|
||||||
Foreground="Black" Stylus.IsPressAndHoldEnabled="False">
|
Foreground="Black" Stylus.IsPressAndHoldEnabled="False">
|
||||||
<!--资源中添加命令-->
|
<!--资源中添加命令-->
|
||||||
<Window.Resources>
|
<Window.Resources>
|
||||||
<RoutedUICommand x:Key="KeyExit" Text=" "/>
|
<RoutedUICommand x:Key="KeyExit" Text=" "/>
|
||||||
|
@ -1374,10 +1374,39 @@ namespace Ink_Canvas
|
|||||||
BtnPPTSlideShowEnd.Visibility = Visibility.Collapsed;
|
BtnPPTSlideShowEnd.Visibility = Visibility.Collapsed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool isButtonBackgroundTransparent = true; //此变量仅用于保存用于幻灯片放映时的优化
|
||||||
private void PptApplication_SlideShowBegin(SlideShowWindow Wn)
|
private void PptApplication_SlideShowBegin(SlideShowWindow Wn)
|
||||||
{
|
{
|
||||||
Application.Current.Dispatcher.Invoke(() =>
|
Application.Current.Dispatcher.Invoke(() =>
|
||||||
{
|
{
|
||||||
|
//调整颜色
|
||||||
|
//MessageBox.Show(string.Format("{0}, {1}", Wn.View..ToString(), Wn.Height.ToString()));
|
||||||
|
double screenRatio = SystemParameters.PrimaryScreenWidth / SystemParameters.PrimaryScreenHeight;
|
||||||
|
//MessageBox.Show(Math.Abs(screenRatio - 16.0 / 9).ToString());
|
||||||
|
if (Math.Abs(screenRatio - 16.0 / 9) <= 0.01)
|
||||||
|
{
|
||||||
|
//MessageBox.Show((Wn.Presentation.PageSetup.SlideWidth / Wn.Presentation.PageSetup.SlideHeight).ToString());
|
||||||
|
if (Wn.Presentation.PageSetup.SlideWidth / Wn.Presentation.PageSetup.SlideHeight < 1.65)
|
||||||
|
{
|
||||||
|
isButtonBackgroundTransparent = ToggleSwitchTransparentButtonBackground.IsOn;
|
||||||
|
|
||||||
|
if (BtnSwitchTheme.Content.ToString() == "深色")
|
||||||
|
{
|
||||||
|
//Light
|
||||||
|
BtnExit.Background = new SolidColorBrush(StringToColor("#AACCCCCC"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Dark
|
||||||
|
BtnExit.Background = new SolidColorBrush(StringToColor("#AA555555"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if(screenRatio == 256 / 135)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
slidescount = Wn.Presentation.Slides.Count;
|
slidescount = Wn.Presentation.Slides.Count;
|
||||||
memoryStreams = new MemoryStream[slidescount + 2];
|
memoryStreams = new MemoryStream[slidescount + 2];
|
||||||
|
|
||||||
@ -1430,6 +1459,28 @@ namespace Ink_Canvas
|
|||||||
{
|
{
|
||||||
Application.Current.Dispatcher.Invoke(() =>
|
Application.Current.Dispatcher.Invoke(() =>
|
||||||
{
|
{
|
||||||
|
if (isButtonBackgroundTransparent == ToggleSwitchTransparentButtonBackground.IsOn &&
|
||||||
|
isButtonBackgroundTransparent == true)
|
||||||
|
{
|
||||||
|
if (Settings.Appearance.IsTransparentButtonBackground)
|
||||||
|
{
|
||||||
|
BtnExit.Background = new SolidColorBrush(StringToColor("#7F909090"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (BtnSwitchTheme.Content.ToString() == "深色")
|
||||||
|
{
|
||||||
|
//Light
|
||||||
|
BtnExit.Background = new SolidColorBrush(StringToColor("#FFCCCCCC"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//Dark
|
||||||
|
BtnExit.Background = new SolidColorBrush(StringToColor("#FF555555"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
BtnPPTSlideShow.Visibility = Visibility.Visible;
|
BtnPPTSlideShow.Visibility = Visibility.Visible;
|
||||||
BtnPPTSlideShowEnd.Visibility = Visibility.Collapsed;
|
BtnPPTSlideShowEnd.Visibility = Visibility.Collapsed;
|
||||||
StackPanelPPTControls.Visibility = Visibility.Collapsed;
|
StackPanelPPTControls.Visibility = Visibility.Collapsed;
|
||||||
|
Loading…
Reference in New Issue
Block a user