-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix OpenFile, SaveFile, Directory pickers style #622
base: develop
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:controls="clr-namespace:Orc.Controls"> | ||
|
||
<Style x:Key="{x:Type controls:DirectoryPicker}" | ||
TargetType="{x:Type controls:DirectoryPicker}"> | ||
<Setter Property="Margin" Value="{DynamicResource Margin.TextBox}" /> | ||
</Style> | ||
|
||
</ResourceDictionary> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | ||
xmlns:controls="clr-namespace:Orc.Controls"> | ||
|
||
<Style x:Key="{x:Type controls:OpenFilePicker}" | ||
TargetType="{x:Type controls:OpenFilePicker}"> | ||
<Setter Property="Margin" Value="{DynamicResource Margin.TextBox}" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. move this setter to DefaultOpenFilePickerStyle (See overall comments) |
||
</Style> | ||
|
||
</ResourceDictionary> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,26 +20,29 @@ | |
|
||
<Label Grid.Column="0" | ||
Content="{Binding LabelText}" | ||
Width="{Binding LabelWidth}" /> | ||
Width="{Binding LabelWidth}" | ||
VerticalAlignment="Center" | ||
Margin="0"/> | ||
|
||
<TextBox AutomationProperties.AutomationId="{x:Static automation:OpenFilePickerMap.SelectedFileTextBoxId}" | ||
Grid.Column="1" | ||
IsReadOnly="True" | ||
Text="{Binding SelectedFileDisplayName, Mode=OneWay}" | ||
Height="{Binding ElementName=OpenFileButton, Path=ActualHeight}"/> | ||
Height="{Binding ElementName=OpenFileButton, Path=ActualHeight}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove it (and also remove it from other pickers, if they have it too) Binding to sizes 95% in cases is wrong solution. I understand that maybe it's not your code, but as long as we noticed it - we should get rid of it: please try to remove it or use VerticalAlignment=Stretch -> whatever will work |
||
Margin="0,0,4,0"/> | ||
|
||
<Button x:Name="OpenFileButton" | ||
AutomationProperties.AutomationId="{x:Static automation:OpenFilePickerMap.OpenFileButtonId}" | ||
Grid.Column="2" | ||
Margin="0,6,2,6" | ||
Margin="0" | ||
Width="24" | ||
Content="..." | ||
ToolTip="{catel:LanguageBinding Controls_BrowseForFile}" | ||
Command="{Binding SelectFile}" /> | ||
|
||
<Button AutomationProperties.AutomationId="{x:Static automation:OpenFilePickerMap.OpenDirectoryButtonId}" | ||
Grid.Column="3" | ||
Margin="2,6,2,6" | ||
Margin="4,0,2,0" | ||
Width="24" | ||
ToolTip="{catel:LanguageBinding Controls_OpenFolder}" | ||
Command="{Binding OpenDirectory}" | ||
|
@@ -51,7 +54,7 @@ | |
|
||
<Button AutomationProperties.AutomationId="{x:Static automation:OpenFilePickerMap.ClearButtonId}" | ||
Grid.Column="4" | ||
Margin="2,6,0,6" | ||
Margin="2,0,0,0" | ||
Width="24" | ||
ToolTip="{catel:LanguageBinding Controls_Clear}" | ||
Command="{Binding Clear}" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,5 +3,8 @@ | |
xmlns:controls="clr-namespace:Orc.Controls"> | ||
|
||
<Style x:Key="{x:Type controls:SaveFilePicker}" | ||
TargetType="{x:Type controls:SaveFilePicker}"/> | ||
TargetType="{x:Type controls:SaveFilePicker}"> | ||
<Setter Property="Margin" Value="{DynamicResource Margin.TextBox}" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. move this setter to DefaultSaveFilePicker (See overall comments) |
||
</Style> | ||
|
||
</ResourceDictionary> |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:local="clr-namespace:Orc.Controls" xmlns:catel="http://schemas.catelproject.com" xmlns:automation="clr-namespace:Orc.Controls.Automation" xmlns:sys="clr-namespace:System;assembly=mscorlib" xmlns:converters="clr-namespace:Orc.Controls.Converters" xmlns:xamlbehaviors="http://schemas.microsoft.com/xaml/behaviors" xmlns:orctheming="http://schemas.wildgums.com/orc/theming"> | ||
<ResourceDictionary.MergedDictionaries> | ||
<ResourceDictionary Source="/Orc.Theming;component/themes/generic.xaml" /> | ||
<ResourceDictionary Source="/Orc.Controls;component/Controls/DirectoryPicker/Themes/DirectoryPicker.generic.xaml" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. looks as it something wrong with generated xaml There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. it should not be merged dictionaries ...because generated.xaml itself solves a problem with merged dictionaries |
||
<ResourceDictionary Source="/Orc.Controls;component/Controls/OpenFilePicker/Themes/OpenFilePicker.generic.xaml" /> | ||
</ResourceDictionary.MergedDictionaries> | ||
<Style x:Key="{x:Type local:AlignmentGrid}" TargetType="{x:Type local:AlignmentGrid}" /> | ||
<Style x:Key="{x:Type local:AnimatedGif}" TargetType="{x:Type local:AnimatedGif}" /> | ||
|
@@ -58,7 +60,6 @@ | |
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
<Style x:Key="{x:Type local:SaveFilePicker}" TargetType="{x:Type local:SaveFilePicker}" /> | ||
<Geometry x:Key="RectangleGeometry">M4,2L20,2C21.1,2 22,2.9 22,4L22,20C22,21.1 21.1,22 20,22L4,22C2.9,22 2,21.1 2,20L2,4C2,2.9 2.9,2 4,2ZM4,4L4,20L20,20L20,4L4,4ZM13,15L11,15L11,17L13,17L13,15ZM13,7L11,7L11,13L13,13L13,7Z</Geometry> | ||
<Geometry x:Key="TriangleGeometry">M2,21.9997L12,2.00026L20.6247,19.2199L20.6291,19.2199L22,21.9997L22,21.9997L22,21.9997L2,21.9997ZM5.0287,19.9997L18.9638,19.9997L12,6.11526L5.0287,19.9997ZM12.9376,16.5456L11.2947,16.5456L11.2947,18.2081L12.9376,18.2081L12.9376,16.5456ZM12.9376,11.5581L11.2947,11.5581L11.2947,14.8831L12.9376,14.8831L12.9376,11.5581Z</Geometry> | ||
<Geometry x:Key="ArrowsOutGeometry">M9.5,13.09L10.91,14.5L6.41,19H10V21H3V14H5V17.59L9.5,13.09M10.91,9.5L9.5,10.91L5,6.41V10H3V3H10V5H6.41L10.91,9.5M14.5,13.09L19,17.59V14H21V21H14V19H17.59L13.09,14.5L14.5,13.09M13.09,9.5L17.59,5H14V3H21V10H19V6.41L14.5,10.91L13.09,9.5Z</Geometry> | ||
|
@@ -1481,6 +1482,9 @@ | |
</Setter.Value> | ||
</Setter> | ||
</Style> | ||
<Style x:Key="{x:Type local:SaveFilePicker}" TargetType="{x:Type local:SaveFilePicker}"> | ||
<Setter Property="Margin" Value="{DynamicResource Margin.TextBox}" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is also strange...Margin should be only on Default***Style |
||
</Style> | ||
<Style x:Key="{x:Type local:SpinButton}" TargetType="{x:Type local:SpinButton}" BasedOn="{StaticResource Orc.Styles.Control}"> | ||
<Setter Property="Template"> | ||
<Setter.Value> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
move this setter to DefaultDirectoryPickerStyle (See overall comments)