aboutsummaryrefslogtreecommitdiffstatsci
path: root/Templates/FileDialog.template
diff options
context:
space:
mode:
authorjpbruyere <jp.bruyere@hotmail.com>2017-02-10 15:54:50 +0100
committerjpbruyere <jp.bruyere@hotmail.com>2017-02-10 15:54:50 +0100
commit456e7c847a4aa6fed44cc2d970ac9400ea54d0c4 (patch)
tree42dc38f31028f3854f55a8203390ed922dd8cd5a /Templates/FileDialog.template
parent5ca711641d1934adf08d2675641e3f61647f3ffc (diff)
TextBox, Label, simpler SVG icon for file sys viewers (improve speed a lot), divers debug and code clean
Diffstat (limited to 'Templates/FileDialog.template')
-rw-r--r--Templates/FileDialog.template116
1 files changed, 38 insertions, 78 deletions
diff --git a/Templates/FileDialog.template b/Templates/FileDialog.template
index 7972b583..8305dfc9 100644
--- a/Templates/FileDialog.template
+++ b/Templates/FileDialog.template
@@ -9,7 +9,7 @@
<GraphicObject Width="5"/>
<Image Margin="1" Width="12" Height="12" Path="{./Icon}"/>
<Label Width="Stretched" Foreground="White" Margin="1" TextAlignment="Center" Text="{./Caption}" />
- <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
+ <Border CornerRadius="0" BorderWidth="1" Foreground="Transparent" Height="12" Width="12"
MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}">
<Image Focusable="true" Name="Image" Margin="0" Width="Stretched" Height="Stretched" Path="#Crow.Images.Icons.exit2.svg"
MouseClick="./butQuitPress"/>
@@ -18,95 +18,55 @@
</HorizontalStack>
<Container Name="Content" MinimumSize="50,50" Background="Onyx">
<VerticalStack Margin="1">
- <TextBox Text="{²./CurrentDirectory}"/>
- <HorizontalStack Spacing="1">
- <DirectoryView ShowFiles="false" Name="dv" CurrentDirectory="{²./CurrentDirectory}" Width="50%" Margin="0">
- <Template>
- <TreeView IsRoot="true" Name="treeView" Data="{./FileSystemEntries}"
- SelectedItemChanged="./onSelectedItemChanged">
- <ItemTemplate DataType="System.IO.FileInfo">
- <HorizontalStack Focusable="true" Height="Fit" Width="Stretched" Background="{../Background}" >
- <Image Margin="2" Width="14" Height="14"
- Path="#Crow.Images.Icons.file.svg"/>
- <Label Text="{Name}" Width="Stretched"
- MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
- MouseLeave="{Background=Transparent}"/>
- </HorizontalStack>
- </ItemTemplate>
- <ItemTemplate DataType="System.IO.DirectoryInfo" Data="GetDirectories">
- <Expandable Caption="{Name}" >
- <Template>
- <VerticalStack>
- <HorizontalStack Spacing="1" Height="Fit" MouseDoubleClick="./onClickForExpand"
- MouseEnter="{Background=hgradient|0:BlueCrayola|1:Transparent}"
- MouseLeave="{Background=Transparent}">
- <Container Margin="1" Width="10" Height="10" Focusable="true" MouseClick="./onClickForExpand"
- MouseEnter="{Background=LightGray}"
- MouseLeave="{Background=Transparent}">
- <Image
- Path="{./Image}"
- Visible="{./IsExpandable}"
- SvgSub="{./IsExpanded}"/>
- </Container>
- <Image Margin="2" Width="14" Height="14"
- Path="#Crow.Images.Icons.folder.svg"/>
- <Label Text="{./Caption}"/>
- </HorizontalStack>
- <Container Name="Content" Visible="false"/>
- </VerticalStack>
- </Template>
- <HorizontalStack Height="Fit">
- <GraphicObject Width="12" Height="10"/>
- <TreeView Name="List" Height="Fit"
- Template="#Crow.Templates.treeList.crow" />
- </HorizontalStack>
- </Expandable>
- </ItemTemplate>
- </TreeView>
- </Template>
- </DirectoryView>
- <Splitter/>
- <DirectoryView ShowFiles="true" Name="fv" CurrentDirectory="{../dv.SelectedItem}" SelectedItemChanged="./onSelectedItemChanged"
- Width="100%" Margin="0">
+ <HorizontalStack Height="Fit">
+ <Button Fit="true" Caption="Up" MouseClick="./goUpDirClick">
+ <Image Margin="2" Width="14" Height="14"
+ Path="#Crow.Icons.level-up.svg"/>
+ </Button>
+ <TextBox Text="{²./CurrentDirectory}"/>
+ </HorizontalStack>
+ <DirectoryView ShowFiles="true" Name="fv" CurrentDirectory="{./CurrentDirectory}" SelectedItemChanged="./onFVSelectedItemChanged"
+ Width="100%" Margin="0" MouseDoubleClick="./onFileSelect">
<Template>
<ListBox Name="fileView" Data="{./FileSystemEntries}" SelectedItemChanged="./onSelectedItemChanged">
<Template>
- <Border BorderWidth="1" Margin="0" MinimumSize="10,10">
- <VerticalStack>
- <Scroller ScrollX="{../scrollbar1.Value}" Name="scroller1"
- VerticalScrolling="False" HorizontalScrolling="true">
- <Wrapper Orientation="Horizontal" Width="Fit" HorizontalAlignment="Left"
- Name="ItemsContainer" Margin="0" Spacing="1"/>
- </Scroller>
- <ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollX}"
- Maximum="{../scroller1.MaximumScroll}" Orientation="Horizontal"
- Height="14" />
- </VerticalStack>
- </Border>
+ <HorizontalStack>
+ <Scroller ScrollX="{../scrollbar1.Value}" Name="scroller1"
+ VerticalScrolling="true" HorizontalScrolling="false">
+ <VerticalStack Height="Fit" VerticalAlignment="Top"
+ Name="ItemsContainer" Margin="0" Spacing="1"/>
+ </Scroller>
+ <ScrollBar Name="scrollbar1" Value="{²../scroller1.ScrollY}"
+ Maximum="{../scroller1.MaximumScroll}" Orientation="Vertical"
+ Width="14" />
+ </HorizontalStack>
</Template>
<ItemTemplate DataType="System.IO.FileInfo">
- <HorizontalStack Focusable="true" Height="Fit" >
- <Image Margin="2" Width="14" Height="14"
- Path="#Crow.Images.Icons.file.svg"/>
- <Label Text="{Name}"
- MouseEnter="{Background=BlueCrayola}"
- MouseLeave="{Background=Transparent}"/>
+ <HorizontalStack Focusable="true" Height="Fit">
+ <Image Margin="2" Width="16" Height="16"
+ Path="#Crow.Icons.file.svg"/>
+ <Label Text="{Name}" Width="Stretched"
+ MouseEnter="{Background=BlueCrayola}"
+ MouseLeave="{Background=Transparent}"/>
</HorizontalStack>
</ItemTemplate>
<ItemTemplate DataType="System.IO.DirectoryInfo">
- <HorizontalStack Focusable="true" Height="Fit" >
- <Image Margin="2" Width="14" Height="14"
- Path="#Crow.Images.Icons.folder.svg"/>
- <Label Text="{Name}"
- MouseEnter="{Background=BlueCrayola}"
- MouseLeave="{Background=Transparent}"/>
- </HorizontalStack>
+ <Border Foreground="Transparent" Focusable="true" Height="Fit">
+ <HorizontalStack
+ MouseEnter="{Background=BlueCrayola}"
+ MouseLeave="{Background=Transparent}">
+ <Image Margin="2" Width="16" Height="16"
+ Path="#Crow.Icons.folder.svg"/>
+ <Label Text="{Name}" Width="Stretched"/>
+ <Label Text="{LastAccessTime}" />
+ </HorizontalStack>
+ </Border>
</ItemTemplate>
</ListBox>
</Template>
</DirectoryView>
- </HorizontalStack>
- <TextBox Text="{./SelectedFile}"/>
+ <TextBox Text="{./SelectedDirectory}"/>
+ <TextBox Text="{²./SelectedFile}"/>
<HorizontalStack Fit="true" HorizontalAlignment="Right">
<Button Caption="Ok" MouseClick="./onFileSelect"/>
<Button Caption="Cancel" MouseClick="./onCancel"/>