private void OnKeyEvent(object sender, Window.KeyEventArgs e)
{
- if (e.Key.KeyPressedName == "XF86AudioLowerVolume")
- {
- if (e.Key.State == Key.StateType.Down)
- {
- mainView.DecreaseSliderValue();
- volumeAppAutoHideTimer.Stop();
- Window.Instance.Show();
- }
- else if (e.Key.State == Key.StateType.Up)
+ if (e.Key.KeyPressedName == "XF86AudioLowerVolume")
{
- if (!mainView.IsAlertPopupShown())
+ if (e.Key.State == Key.StateType.Down)
{
- volumeAppAutoHideTimer.Start();
+ mainView.DecreaseSliderValue();
+ volumeAppAutoHideTimer.Stop();
+ Window.Instance.Show();
+ }
+ else if (e.Key.State == Key.StateType.Up)
+ {
+ if (!mainView.IsAlertPopupShown())
+ {
+ volumeAppAutoHideTimer.Start();
+ }
}
}
- }
- else if (e.Key.KeyPressedName == "XF86AudioRaiseVolume")
- {
- if (e.Key.State == Key.StateType.Down)
- {
- mainView.IncreaseSliderValue();
- volumeAppAutoHideTimer.Stop();
- Window.Instance.Show();
- }
- else if (e.Key.State == Key.StateType.Up)
+ else if (e.Key.KeyPressedName == "XF86AudioRaiseVolume")
{
- if (!mainView.IsAlertPopupShown())
+ if (e.Key.State == Key.StateType.Down)
{
- volumeAppAutoHideTimer.Start();
+ mainView.IncreaseSliderValue();
+ volumeAppAutoHideTimer.Stop();
+ Window.Instance.Show();
+ }
+ else if (e.Key.State == Key.StateType.Up)
+ {
+ if (!mainView.IsAlertPopupShown())
+ {
+ volumeAppAutoHideTimer.Start();
+ }
}
}
}
- }
private void StartTimer()
{
volumeAppAutoHideTimer?.Start();
return true;
}
}
- }
+}
{
Name = "CancelButton",
ThemeChangeSensitive = true,
+ Size2D = AppCommon.buttonSize,
};
increaseButton = new Button()
{
Id="DarkTheme">
<ViewStyle x:Key="MainViewBackground" BackgroundColor="#16131A" ThemeChangeSensitive="true" />
- <c:AlertDialogStyle x:Key="AlertDialogBackground" ThemeChangeSensitive="true" BackgroundColor="#16131A">
- <c:AlertDialogStyle.TitleTextLabel>
- <TextLabelStyle TextColor="#FDFDFD" FontFamily="BreezeSans" PixelSize="24sp" />
- </c:AlertDialogStyle.TitleTextLabel>
- <c:AlertDialogStyle.MessageTextLabel>
- <TextLabelStyle TextColor="#FDFDFD" FontFamily="BreezeSans" PixelSize="24sp" />
- </c:AlertDialogStyle.MessageTextLabel>
- </c:AlertDialogStyle>
- <c:ButtonStyle x:Key="CancelButton" ThemeChangeSensitive="true" Size="252sp, 48sp" IsSelectable="false" IsEnabled="true" BackgroundColor="Transparent" >
- <c:ButtonStyle.BackgroundImage>*Resource*/Images/dark/button_outline.png</c:ButtonStyle.BackgroundImage>
- <c:ButtonStyle.Text>
- <TextLabelStyle TextColor="#FF8A00" FontFamily="BreezeSans" PixelSize="24sp" Text="Cancel" HorizontalAlignment="Center" VerticalAlignment="Center"/>
- </c:ButtonStyle.Text>
- </c:ButtonStyle>
- <c:SliderStyle x:Key="Slider" >
- <c:SliderStyle.Thumb>
- <ImageViewStyle>
- <ImageViewStyle.ResourceUrl>
- <Selector x:TypeArguments="x:String" Normal="*Resource*/Images/dark/thumb_dark.png" />
- </ImageViewStyle.ResourceUrl>
- </ImageViewStyle>
- </c:SliderStyle.Thumb>
- </c:SliderStyle>
+ <c:AlertDialogStyle x:Key="AlertDialogBackground" ThemeChangeSensitive="true" BackgroundColor="#16131A">
+ <c:AlertDialogStyle.TitleTextLabel>
+ <TextLabelStyle TextColor="#FDFDFD" FontFamily="BreezeSans" PixelSize="24sp" />
+ </c:AlertDialogStyle.TitleTextLabel>
+ <c:AlertDialogStyle.MessageTextLabel>
+ <TextLabelStyle TextColor="#FDFDFD" FontFamily="BreezeSans" PixelSize="24sp" />
+ </c:AlertDialogStyle.MessageTextLabel>
+ </c:AlertDialogStyle>
+ <c:ButtonStyle x:Key="CancelButton" ThemeChangeSensitive="true" IsSelectable="false" IsEnabled="true" BackgroundColor="Transparent" >
+ <c:ButtonStyle.BackgroundImage>*Resource*/Images/dark/button_outline.png</c:ButtonStyle.BackgroundImage>
+ <c:ButtonStyle.Text>
+ <TextLabelStyle TextColor="#FF8A00" FontFamily="BreezeSans" PixelSize="24sp" Text="Cancel" HorizontalAlignment="Center" VerticalAlignment="Center"/>
+ </c:ButtonStyle.Text>
+ </c:ButtonStyle>
+ <c:SliderStyle x:Key="Slider" >
+ <c:SliderStyle.Thumb>
+ <ImageViewStyle>
+ <ImageViewStyle.ResourceUrl>
+ <Selector x:TypeArguments="x:String" Normal="*Resource*/Images/dark/thumb_dark.png" Disabled="*Resource*/Images/dark/thumb_dark.png" />
+ </ImageViewStyle.ResourceUrl>
+ </ImageViewStyle>
+ </c:SliderStyle.Thumb>
+ </c:SliderStyle>
</Theme>
\ No newline at end of file
<TextLabelStyle TextColor="#090E21" FontFamily="BreezeSans" PixelSize="24sp" />
</c:AlertDialogStyle.MessageTextLabel>
</c:AlertDialogStyle>
- <c:ButtonStyle x:Key="CancelButton" ThemeChangeSensitive="true" Size="252sp, 48sp" IsSelectable="false" IsEnabled="true" BackgroundColor="Transparent" >
+ <c:ButtonStyle x:Key="CancelButton" ThemeChangeSensitive="true" IsSelectable="false" IsEnabled="true" BackgroundColor="Transparent" >
<c:ButtonStyle.BackgroundImage>*Resource*/Images/light/button_outline.png</c:ButtonStyle.BackgroundImage>
<c:ButtonStyle.Text>
<TextLabelStyle TextColor="#FF6200" FontFamily="BreezeSans" PixelSize="24sp" Text="Cancel" HorizontalAlignment="Center" VerticalAlignment="Center"/>
</c:ButtonStyle.Text>
</c:ButtonStyle>
<c:SliderStyle x:Key="Slider" >
- <c:SliderStyle.Thumb>
- <ImageViewStyle>
- <ImageViewStyle.ResourceUrl>
- <Selector x:TypeArguments="x:String" Normal="*Resource*/Images/light/thumb_light.png" />
- </ImageViewStyle.ResourceUrl>
- </ImageViewStyle>
- </c:SliderStyle.Thumb>
+ <c:SliderStyle.Thumb>
+ <ImageViewStyle>
+ <ImageViewStyle.ResourceUrl>
+ <Selector x:TypeArguments="x:String" Normal="*Resource*/Images/light/thumb_light.png" Disabled="*Resource*/Images/light/thumb_light.png"/>
+ </ImageViewStyle.ResourceUrl>
+ </ImageViewStyle>
+ </c:SliderStyle.Thumb>
</c:SliderStyle>
</Theme>
\ No newline at end of file