Merge pull request #23 from nventive/dev/madi/fix-button-themeing

Dev/madi/fix button themeing
This commit is contained in:
MaximeDionNventiveCom 2019-05-26 08:18:58 -04:00 committed by GitHub
commit 6843d212c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 1872 additions and 1859 deletions

View file

@ -182,17 +182,29 @@
</ResourceDictionary.ThemeDictionaries>--> </ResourceDictionary.ThemeDictionaries>-->
<!-- UNO TODO BEGIN THEME RESOURCES --> <!-- UNO TODO BEGIN THEME RESOURCES -->
<Thickness x:Key="HighContrastThicknessTop"> <Thickness x:Key="HighContrastThicknessTop">0,0,0,0</Thickness>
0,0,0,0
</Thickness>
<x:Double x:Key="HighContrastStrokeThickness"> <x:Double x:Key="HighContrastStrokeThickness">0</x:Double>
0
</x:Double>
<Color x:Key="AltHighColor">#FFF2F2F2</Color> <Color x:Key="AltHighColor">#FFF2F2F2</Color>
<Color x:Key="ChromeMediumLowColor">#FFE0E0E0</Color> <Color x:Key="ChromeMediumLowColor">#FFE0E0E0</Color>
<Color x:Key="AccentPressColor">#FFB0DCFF</Color>
<Color x:Key="AccentHoverColor">#FF0077D7</Color>
<SolidColorBrush x:Key="AccentPressBackgroundColorBrush"
Color="{StaticResource AccentPressColor}" />
<SolidColorBrush x:Key="AccentHoverBackgroundColorBrush"
Color="{StaticResource AccentHoverColor}" />
<SolidColorBrush x:Key="AccentPressForegroundColorBrush"
Color="White" />
<SolidColorBrush x:Key="AccentHoverForegroundColorBrush"
Color="White" />
<SolidColorBrush x:Key="SystemControlBackgroundAltHighBrush" <SolidColorBrush x:Key="SystemControlBackgroundAltHighBrush"
Color="{StaticResource AltHighColor}" /> Color="{StaticResource AltHighColor}" />
@ -249,8 +261,7 @@
<win:RevealBackgroundBrush x:Key="AppControlHighlightAltListAccentHighRevealBackgroundBrush" <win:RevealBackgroundBrush x:Key="AppControlHighlightAltListAccentHighRevealBackgroundBrush"
TargetTheme="Dark" TargetTheme="Dark"
Color="{ThemeResource SystemAccentColorDark3}" Color="{ThemeResource SystemAccentColorDark3}"
FallbackColor="{ThemeResource SystemAccentColorDark3}" FallbackColor="{ThemeResource SystemAccentColorDark3}" />
/>
<xamarin:SolidColorBrush x:Key="AppControlHighlightAltListAccentHighRevealBackgroundBrush" <xamarin:SolidColorBrush x:Key="AppControlHighlightAltListAccentHighRevealBackgroundBrush"
Color="{ThemeResource SystemColorHighlightTextColor}" /> Color="{ThemeResource SystemColorHighlightTextColor}" />
@ -316,11 +327,11 @@
<Setter Property="Foreground" <Setter Property="Foreground"
Value="{ThemeResource SystemControlForegroundBaseHighBrush}" /> Value="{ThemeResource SystemControlForegroundBaseHighBrush}" />
<Setter Property="HoverBackground" <Setter Property="HoverBackground"
Value="{ThemeResource AppControlHoverButtonFaceBrush}" /> Value="{StaticResource AppControlHoverButtonFaceBrush}" />
<Setter Property="HoverForeground" <Setter Property="HoverForeground"
Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" /> Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
<Setter Property="PressBackground" <Setter Property="PressBackground"
Value="{ThemeResource AppControlPressedButtonFaceBrush}" /> Value="{StaticResource AppControlPressedButtonFaceBrush}" />
<Setter Property="PressForeground" <Setter Property="PressForeground"
Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" /> Value="{ThemeResource SystemControlHighlightAltBaseHighBrush}" />
<Setter Property="BorderThickness" <Setter Property="BorderThickness"
@ -563,16 +574,16 @@
<Style x:Key="AccentCalcButtonStyle" <Style x:Key="AccentCalcButtonStyle"
BasedOn="{StaticResource SymbolOperatorButtonStyle}" BasedOn="{StaticResource SymbolOperatorButtonStyle}"
TargetType="Controls:CalculatorButton"> TargetType="Controls:CalculatorButton">
<!--
UNO TODO
<Setter Property="HoverBackground" <Setter Property="HoverBackground"
Value="{ThemeResource SystemControlHighlightAccentRevealBackgroundBrush}" /> Value="{StaticResource AccentHoverBackgroundColorBrush}" />
<Setter Property="HoverForeground" <Setter Property="HoverForeground"
Value="{ThemeResource SystemControlHighlightAltAltHighBrush}" />--> Value="{ThemeResource AccentHoverForegroundColorBrush}" />
<Setter Property="PressBackground" <Setter Property="PressBackground"
Value="{ThemeResource AppControlHighlightAltListAccentHighRevealBackgroundBrush}" /> Value="{StaticResource AccentPressBackgroundColorBrush}" />
<Setter Property="PressForeground" <Setter Property="PressForeground"
Value="{ThemeResource SystemControlHighlightAltAltHighBrush}" /> Value="{ThemeResource AccentHoverForegroundColorBrush}" />
</Style> </Style>
<!-- RESULTS --> <!-- RESULTS -->

View file

@ -26,28 +26,28 @@
--> -->
<!-- CalculatorBaseStyle --> <!-- CalculatorBaseStyle -->
<Style x:Key="CalculatorBaseStyle" <Style x:Name="CalculatorBaseStyle"
TargetType="local:Calculator"> TargetType="local:Calculator">
<Setter Property="Margin" <Setter Property="Margin"
Value="0,0,0,0"/> Value="0,0,0,0" />
</Style> </Style>
<!-- UnitConverterBaseStyle --> <!-- UnitConverterBaseStyle -->
<Style x:Key="UnitConverterBaseStyle" <Style x:Name="UnitConverterBaseStyle"
TargetType="local:UnitConverter"> TargetType="local:UnitConverter">
<Setter Property="Visibility" <Setter Property="Visibility"
Value="Collapsed"/> Value="Collapsed" />
<Setter Property="IsEnabled" <Setter Property="IsEnabled"
Value="False"/> Value="False" />
<Setter Property="Margin" <Setter Property="Margin"
Value="0,0,0,0"/> Value="0,0,0,0" />
</Style> </Style>
<!-- AboutFlyoutPresenterStyle --> <!-- AboutFlyoutPresenterStyle -->
<Style x:Key="AboutFlyoutPresenterStyle" <Style x:Key="AboutFlyoutPresenterStyle"
TargetType="FlyoutPresenter"> TargetType="FlyoutPresenter">
<Setter Property="IsTabStop" <Setter Property="IsTabStop"
Value="False"/> Value="False" />
<!-- <!--
<Setter Property="AutomationProperties.AccessibilityView" <Setter Property="AutomationProperties.AccessibilityView"
Value="Raw"/> Value="Raw"/>
@ -58,20 +58,21 @@
<Style x:Key="NavViewItemStyle" <Style x:Key="NavViewItemStyle"
TargetType="NavigationViewItem"> TargetType="NavigationViewItem">
<Setter Property="KeyTipPlacementMode" <Setter Property="KeyTipPlacementMode"
Value="Right"/> Value="Right" />
</Style> </Style>
</Page.Resources> </Page.Resources>
<Grid toolkit:VisibleBoundsPadding.PaddingMask="All" <Grid toolkit:VisibleBoundsPadding.PaddingMask="All"
android:Background="White"> android:Background="White">
<Grid.RowDefinitions> <Grid.RowDefinitions>
<RowDefinition Height="Auto"/> <RowDefinition Height="Auto" />
<!-- <!--
This row is padding for the SystemFocusVisuals, This row is padding for the SystemFocusVisuals,
otherwise the focus rectangles render under the title bar controls. otherwise the focus rectangles render under the title bar controls.
--> -->
<RowDefinition x:Name="FocusVisualMargin" Height="3"/> <RowDefinition x:Name="FocusVisualMargin"
<RowDefinition Height="*"/> Height="3" />
<RowDefinition Height="*" />
</Grid.RowDefinitions> </Grid.RowDefinitions>
<VisualStateManager.VisualStateGroups> <VisualStateManager.VisualStateGroups>
@ -79,25 +80,25 @@
<VisualState x:Name="ConverterWide"> <VisualState x:Name="ConverterWide">
<VisualState.StateTriggers> <VisualState.StateTriggers>
<AdaptiveTrigger MinWindowHeight="{StaticResource AppMinWindowHeight}" <AdaptiveTrigger MinWindowHeight="{StaticResource AppMinWindowHeight}"
MinWindowWidth="640"/> MinWindowWidth="640" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
</VisualState> </VisualState>
<VisualState x:Name="DockVisible"> <VisualState x:Name="DockVisible">
<VisualState.StateTriggers> <VisualState.StateTriggers>
<AdaptiveTrigger MinWindowHeight="{StaticResource AppMinWindowHeight}" <AdaptiveTrigger MinWindowHeight="{StaticResource AppMinWindowHeight}"
MinWindowWidth="560"/> MinWindowWidth="560" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
</VisualState> </VisualState>
<VisualState x:Name="MinSizeLayout"> <VisualState x:Name="MinSizeLayout">
<VisualState.StateTriggers> <VisualState.StateTriggers>
<AdaptiveTrigger MinWindowHeight="{StaticResource AppMinWindowHeight}" <AdaptiveTrigger MinWindowHeight="{StaticResource AppMinWindowHeight}"
MinWindowWidth="{StaticResource AppMinWindowWidth}"/> MinWindowWidth="{StaticResource AppMinWindowWidth}" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
</VisualState> </VisualState>
<VisualState x:Name="DefaultLayout"> <VisualState x:Name="DefaultLayout">
<VisualState.StateTriggers> <VisualState.StateTriggers>
<AdaptiveTrigger MinWindowHeight="0" <AdaptiveTrigger MinWindowHeight="0"
MinWindowWidth="0"/> MinWindowWidth="0" />
</VisualState.StateTriggers> </VisualState.StateTriggers>
</VisualState> </VisualState>
</VisualStateGroup> </VisualStateGroup>
@ -110,16 +111,16 @@
--> -->
<Button x:Name="copyButton" <Button x:Name="copyButton"
x:Uid="copyButton" x:Uid="copyButton"
Command="{x:Bind Model.CopyCommand}"/> Command="{x:Bind Model.CopyCommand}" />
<Button x:Name="pasteButton" <Button x:Name="pasteButton"
x:Uid="pasteButton" x:Uid="pasteButton"
Command="{x:Bind Model.PasteCommand}"/> Command="{x:Bind Model.PasteCommand}" />
<Button x:Name="copyButtonAlternate" <Button x:Name="copyButtonAlternate"
x:Uid="copyButtonAlternate" x:Uid="copyButtonAlternate"
Command="{x:Bind Model.CopyCommand}"/> Command="{x:Bind Model.CopyCommand}" />
<Button x:Name="pasteButtonAlternate" <Button x:Name="pasteButtonAlternate"
x:Uid="pasteButtonAlternate" x:Uid="pasteButtonAlternate"
Command="{x:Bind Model.PasteCommand}"/> Command="{x:Bind Model.PasteCommand}" />
</StackPanel> </StackPanel>
<!-- Title Bar --> <!-- Title Bar -->
@ -150,7 +151,8 @@
<NavigationView.PaneFooter> <NavigationView.PaneFooter>
<StackPanel HorizontalAlignment="Stretch" Orientation="Vertical"> <StackPanel HorizontalAlignment="Stretch"
Orientation="Vertical">
<NavigationViewList x:Name="NavFooter" <NavigationViewList x:Name="NavFooter"
Width="{x:Bind NavView.OpenPaneLength, Mode=Oneway}" Width="{x:Bind NavView.OpenPaneLength, Mode=Oneway}"
@ -165,7 +167,7 @@
Style="{StaticResource NavViewItemStyle}"> Style="{StaticResource NavViewItemStyle}">
<NavigationViewItem.Icon> <NavigationViewItem.Icon>
<FontIcon FontFamily="{StaticResource CalculatorFontFamily}" <FontIcon FontFamily="{StaticResource CalculatorFontFamily}"
Glyph="&#xe946;"/> Glyph="&#xe946;" />
</NavigationViewItem.Icon> </NavigationViewItem.Icon>
<TextBlock Text="" <TextBlock Text=""
x:Name="AboutText" /> x:Name="AboutText" />
@ -178,7 +180,7 @@
Opened="OnAboutFlyoutOpened"> Opened="OnAboutFlyoutOpened">
<local:AboutFlyout x:Name="AboutPage" <local:AboutFlyout x:Name="AboutPage"
x:Load="False"/> x:Load="False" />
</Flyout> </Flyout>
</NavigationViewItem.ContextFlyout> </NavigationViewItem.ContextFlyout>
</NavigationViewItem> </NavigationViewItem>
@ -195,7 +197,7 @@
HorizontalAlignment="Left" HorizontalAlignment="Left"
VerticalAlignment="Top" VerticalAlignment="Top"
Style="{StaticResource SubtitleTextBlockStyle}" Style="{StaticResource SubtitleTextBlockStyle}"
Text="{x:Bind Model.CategoryName, Mode=OneWay}"/> Text="{x:Bind Model.CategoryName, Mode=OneWay}" />
<Border x:Name="CalcHolder"> <Border x:Name="CalcHolder">
<!-- PLACEHOLDER!!!! This is where the calculator goes when it is delay loaded --> <!-- PLACEHOLDER!!!! This is where the calculator goes when it is delay loaded -->