diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2020-02-16 07:36:48 +0100 |
|---|---|---|
| committer | j-p <jp_bruyere@hotmail.com> | 2020-05-10 00:50:02 +0200 |
| commit | 78ff96edf53ba273aa157a5bda2aa5b7a10f1c5f (patch) | |
| tree | 90250c94b0ca8ddcb55ad11962dbe31e129e586f /Samples | |
| parent | 701e6c825abbfb431bda3f6692e32a5f12e7307b (diff) | |
roslyn editor
Diffstat (limited to 'Samples')
4 files changed, 70 insertions, 27 deletions
diff --git a/Samples/common/ui/Interfaces/Divers/colorPicker.crow b/Samples/common/ui/Interfaces/Divers/colorPicker.crow index afdef146..92a5c054 100644 --- a/Samples/common/ui/Interfaces/Divers/colorPicker.crow +++ b/Samples/common/ui/Interfaces/Divers/colorPicker.crow @@ -1,7 +1,7 @@ <?xml version="1.0"?> <VerticalStack> - <ColorPicker SelectedColor="{²../go.Background}" Name="colorPicker" Background="DimGrey" Margin="5" Fit="True" /> + <ColorPicker CurrentColor="{²../go.Background}" Name="colorPicker" Background="DimGrey" Margin="5" Fit="True" /> <Widget Name="go" Width="100" Height="60" Background="DarkBlue"/> - <Widget Name="go" Width="100" Height="60" Background="{../colorPicker.SelectedColor}"/> - <Label Text="{../colorPicker.SelectedColor}"/> + <Widget Name="go" Width="100" Height="60" Background="{../colorPicker.CurrentColor}"/> + <Label Text="{../colorPicker.CurrentColor}"/> </VerticalStack>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/Divers/colorPicker2.crow b/Samples/common/ui/Interfaces/Divers/colorPicker2.crow new file mode 100644 index 00000000..da1a8830 --- /dev/null +++ b/Samples/common/ui/Interfaces/Divers/colorPicker2.crow @@ -0,0 +1,7 @@ +<?xml version="1.0"?> +<VerticalStack> + <ColorPicker CurrentColor="{²../go.Background}" Name="colorPicker" Background="DimGrey" Margin="5" Width="300" Template="#ui.ColorPicker.template" /> + <Widget Name="go" Width="100" Height="60" Background="DarkBlue"/> + <Widget Name="go" Width="100" Height="60" Background="{../colorPicker.CurrentColor}"/> + <Label Text="{../colorPicker.CurrentColor}"/> +</VerticalStack>
\ No newline at end of file diff --git a/Samples/common/ui/templates/ColorPicker.template b/Samples/common/ui/templates/ColorPicker.template new file mode 100644 index 00000000..7c5ff263 --- /dev/null +++ b/Samples/common/ui/templates/ColorPicker.template @@ -0,0 +1,60 @@ +<?xml version="1.0"?> +<TabView SelectedTab="0"> + <TabItem Caption="HSV"> + <Border Background="{./Background}" Foreground="{./Foreground}" Width="Stretched" + CornerRadius="{./CornerRadius}" BorderWidth="1"> + <VerticalStack Margin="2"> + <Widget Width="30" Height="16" Background="{./CurrentColor}"/> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="R:"/> + <ColorSlider Name="cs" Component="Red" CurrentColor="{²../../../../../../CurrentColor}"/> + <Label Style="labColorV" Text="{../cs.CurrentValue}" /> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="G:"/> + <ColorSlider Name="cs" Component="Green" CurrentColor="{²../../../../../../CurrentColor}"/> + <Label Style="labColorV" Text="{../cs.CurrentValue}" /> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="B:"/> + <ColorSlider Name="cs" Component="Blue" CurrentColor="{²../../../../../../CurrentColor}"/> + <Label Style="labColorV" Text="{../cs.CurrentValue}" /> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="A:"/> + <ColorSlider Name="cs" Component="Alpha" CurrentColor="{²../../../../../../CurrentColor}"/> + <Label Style="labColorV" Text="{../cs.CurrentValue}" /> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="H:"/> + <ColorSlider Name="cs" Component="Hue" CurrentColor="{²../../../../../../CurrentColor}"/> + <Label Style="labColorV" Text="{../cs.CurrentValue}" /> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="S:"/> + <ColorSlider Name="cs" Component="Saturation" CurrentColor="{²../../../../../../CurrentColor}"/> + <Label Style="labColorV" Text="{../cs.CurrentValue}" /> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="V:"/> + <ColorSlider Name="cs" Component="Value" CurrentColor="{²../../../../../../CurrentColor}"/> + <Label Style="labColorV" Text="{../cs.CurrentValue}" /> + </HorizontalStack> + </VerticalStack> + </Border> + </TabItem> + <TabItem Caption="List" Height="Stretched"> + <ListBox Data="{../../../ColorList}" SelectedItem="{²../../../CurrentColor}"> + <Template> + <Scroller Name="scroller1" Margin="5"> + <Wrapper Name="ItemsContainer" Height="Fit" VerticalAlignment="Top"/> + </Scroller> + </Template> + <ItemTemplate> + <Border Width="16" Height="16" Background="{}" Foreground="Transparent" Tooltip="{}" + MouseEnter="{Foreground=Black}" + MouseLeave="{Foreground=Transparent}"/> + </ItemTemplate> + </ListBox> + </TabItem> +</TabView>
\ No newline at end of file diff --git a/Samples/common/ui/templates/TabItem.template b/Samples/common/ui/templates/TabItem.template deleted file mode 100644 index fd0f310d..00000000 --- a/Samples/common/ui/templates/TabItem.template +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0"?> -<GenericStack Orientation="Vertical" Spacing="0" - Background="{./Background}" - MouseEnter="{/caption.Foreground=White}" - MouseLeave="{/caption.Foreground=Grey}"> - <HorizontalStack Left="{./TabOffset}" - Name="TabTitle" - HorizontalAlignment="Left" - Height="{./TabHeight}" - Width="{./TabWidth}"> - <Label Name="caption" Text="{./Caption}" Foreground="Grey" Width="Stretched"/> - <Label Text="{./ViewIndex}" Foreground="Green"/> - <Label Text="{./TabOffset}" Foreground="Red"/> - <Border CornerRadius="5" 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.Icons.exit2.svg" - MouseClick="./butCloseTabClick"/> - </Border> - </HorizontalStack> - <Container Margin="20"> - <Container Background="DimGrey" Name="Content"/> - </Container> -</GenericStack> - |