diff options
Diffstat (limited to 'Samples')
6 files changed, 95 insertions, 61 deletions
diff --git a/Samples/common/ui/Interfaces/Divers/color3.crow b/Samples/common/ui/Interfaces/Divers/color3.crow deleted file mode 100644 index 1788004c..00000000 --- a/Samples/common/ui/Interfaces/Divers/color3.crow +++ /dev/null @@ -1,7 +0,0 @@ -<?xml version="1.0"?> -<VerticalStack> - <Widget Name="go" Width="100" Height="60" Background="DarkBlue"/> - <Widget Width="100" Height="60" Background="{../colorPicker.CurrentColor}"/> - <Label Text="{../colorPicker.CurrentColor}"/> - <ColorPicker CurrentColor="{²../go.Background}" Name="colorPicker" Background="DimGrey" MinimumSize="0,0" Width="300" Template="/mnt/devel/CrowIDE/Crow/Samples/common/ui/templates/ColorPicker.template" /> -</VerticalStack>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/Divers/colorPicker.crow b/Samples/common/ui/Interfaces/Divers/colorPicker.crow index c1912be6..e38957eb 100644 --- a/Samples/common/ui/Interfaces/Divers/colorPicker.crow +++ b/Samples/common/ui/Interfaces/Divers/colorPicker.crow @@ -1,6 +1,6 @@ <?xml version="1.0"?> <VerticalStack> - <ColorPicker CurrentColor="{²../go.Background}" Name="colorPicker" Background="DimGrey" Width="400" /> + <ColorPicker CurrentColor="{²../go.Background}" Name="colorPicker" Background="Jet" Width="220" /> <Widget Name="go" Width="100" Height="60" Background="DarkBlue"/> <Widget Width="100" Height="60" Background="{../colorPicker.CurrentColor}"/> <Label Text="{../colorPicker.CurrentColor}"/> diff --git a/Samples/common/ui/Interfaces/Divers/colorSlider3.crow b/Samples/common/ui/Interfaces/Divers/colorSlider3.crow index 4236b929..a8e5257b 100644 --- a/Samples/common/ui/Interfaces/Divers/colorSlider3.crow +++ b/Samples/common/ui/Interfaces/Divers/colorSlider3.crow @@ -1,47 +1,47 @@ <VerticalStack Margin="50" Spacing="20" Background="Black"> <ColorPicker> <Template> -<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}" Value="{²./Red}"/> - <Label Style="labColorV" Text="{../cs.Value}" /> - </HorizontalStack> - <HorizontalStack Height="Fit"> - <Label Style="labColor" Text="G:"/> - <ColorSlider Name="cs" Component="Green" CurrentColor="{./CurrentColor}" Value="{²./Green}"/> - <Label Style="labColorV" Text="{../cs.Value}" /> - </HorizontalStack> - <HorizontalStack Height="Fit"> - <Label Style="labColor" Text="B:"/> - <ColorSlider Name="cs" Component="Blue" CurrentColor="{./CurrentColor}" Value="{²./Blue}"/> - <Label Style="labColorV" Text="{../cs.Value}" /> - </HorizontalStack> - <HorizontalStack Height="Fit"> - <Label Style="labColor" Text="A:"/> - <ColorSlider Name="cs" Component="Alpha" CurrentColor="{./CurrentColor}" Value="{²./Alpha}"/> - <Label Style="labColorV" Text="{../cs.Value}" /> - </HorizontalStack> - <HorizontalStack Height="Fit"> - <Label Style="labColor" Text="H:"/> - <ColorSlider Name="cs" Component="Hue" CurrentColor="{./CurrentColor}" Value="{²./Hue}"/> - <Label Style="labColorV" Text="{../cs.Value}" /> - </HorizontalStack> - <HorizontalStack Height="Fit"> - <Label Style="labColor" Text="S:"/> - <ColorSlider Name="cs" Component="Saturation" CurrentColor="{./CurrentColor}" Value="{²./Saturation}"/> - <Label Style="labColorV" Text="{../cs.Value}" /> - </HorizontalStack> - <HorizontalStack Height="Fit"> - <Label Style="labColor" Text="V:"/> - <ColorSlider Name="cs" Component="Value" CurrentColor="{./CurrentColor}" Value="{²./Value}"/> - <Label Style="labColorV" Text="{../cs.Value}" /> - </HorizontalStack> - </VerticalStack> -</Border> + <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}" Value="{²./Red}"/> + <Label Style="labColorV" Text="{../cs.Value}" /> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="G:"/> + <ColorSlider Name="cs" Component="Green" CurrentColor="{./CurrentColor}" Value="{²./Green}"/> + <Label Style="labColorV" Text="{../cs.Value}" /> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="B:"/> + <ColorSlider Name="cs" Component="Blue" CurrentColor="{./CurrentColor}" Value="{²./Blue}"/> + <Label Style="labColorV" Text="{../cs.Value}" /> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="A:"/> + <ColorSlider Name="cs" Component="Alpha" CurrentColor="{./CurrentColor}" Value="{²./Alpha}"/> + <Label Style="labColorV" Text="{../cs.Value}" /> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="H:"/> + <ColorSlider Name="cs" Component="Hue" CurrentColor="{./CurrentColor}" Value="{²./Hue}"/> + <Label Style="labColorV" Text="{../cs.Value}" /> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="S:"/> + <ColorSlider Name="cs" Component="Saturation" CurrentColor="{./CurrentColor}" Value="{²./Saturation}"/> + <Label Style="labColorV" Text="{../cs.Value}" /> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Style="labColor" Text="V:"/> + <ColorSlider Name="cs" Component="Value" CurrentColor="{./CurrentColor}" Value="{²./Value}"/> + <Label Style="labColorV" Text="{../cs.Value}" /> + </HorizontalStack> + </VerticalStack> + </Border> </Template> </ColorPicker> </VerticalStack>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/Divers/colorSlider4.crow b/Samples/common/ui/Interfaces/Divers/colorSlider4.crow index 95463636..c24194ab 100644 --- a/Samples/common/ui/Interfaces/Divers/colorSlider4.crow +++ b/Samples/common/ui/Interfaces/Divers/colorSlider4.crow @@ -1,13 +1,13 @@ -<ColorSlider Width="400" Component="Red" Background="Grey" Height="34" CursorSize="24" > -<Template> - <Group Background="{./Background}" > - <ColorGauge Component="{./Component}" CurrentColor="{./CurrentColor}" Orientation="{./Orientation}" Margin="10" Height="Stretched" CornerRadius="10"/> - <Border Name="Cursor" Foreground="White" CornerRadius="15" BorderWidth="2"> - <Group Fit="true"> - <Label Left="2" Top="2" Text="{./Value}" Foreground="Black" Font="mono bold, 10"/> - <Label Text="{./Value}" Foreground="WhiteSmoke" Font="mono bold, 10"/> - </Group> - </Border> - </Group> -</Template> +<ColorSlider Width="400" Component="Red" Background="Grey" Height="20" CursorSize="20" > + <Template> + <Group Background="{./Background}" > + <ColorGauge Component="{./Component}" CurrentColor="{./CurrentColor}" Orientation="{./Orientation}" Margin="3" Height="Stretched" CornerRadius="10"/> + <Border Name="Cursor" Foreground="White" CornerRadius="0" BorderWidth="1"> + <Group Fit="true"> + <Label Left="2" Top="2" Text="{./Value}" Foreground="Black" Font="mono bold, 10"/> + <Label Text="{./Value}" Foreground="WhiteSmoke" Font="mono bold, 10"/> + </Group> + </Border> + </Group> + </Template> </ColorSlider>
\ No newline at end of file diff --git a/Samples/common/ui/Interfaces/Divers/colorSlider5.crow b/Samples/common/ui/Interfaces/Divers/colorSlider5.crow new file mode 100644 index 00000000..4fe37994 --- /dev/null +++ b/Samples/common/ui/Interfaces/Divers/colorSlider5.crow @@ -0,0 +1,8 @@ +<ColorSlider Width="400" Component="Red" Background="Transparent" Height="16" CursorSize="10" > + <Template> + <Group Background="{./Background}" > + <ColorGauge Component="{./Component}" CurrentColor="{./CurrentColor}" Orientation="{./Orientation}" Margin="5" Height="Stretched" CornerRadius="10"/> + <Shape Name="Cursor" Foreground="White" Size="10,20" Path="M 5.5,11.5 L 9.5,15.5 L 9.5,19.5 L 1.5,19.5 L 1.5,15.5 F G" Scaled="false" KeepProportions="true" StrokeWidth="0" Margin="0" /> + </Group> + </Template> +</ColorSlider> diff --git a/Samples/common/ui/templates/ColorPicker2.template b/Samples/common/ui/templates/ColorPicker2.template new file mode 100644 index 00000000..91ec1d12 --- /dev/null +++ b/Samples/common/ui/templates/ColorPicker2.template @@ -0,0 +1,33 @@ +<ColorPicker> +<Template> +<Popper Margin="0" Caption="{./CurrentColor}" Background="{./Background}" > + <Template> + <HorizontalStack Margin="1" Spacing="3" Background="{./Background}"> + <Border Width="18" Height="12" CornerRadius="3" + Background="{../../../CurrentColor}"> + </Border> + <Label Width="Stretched" Text="{./Caption}" Foreground="{./Foreground}" /> + </HorizontalStack> + </Template>/> + <TabView MinimumSize="{../MinimumPopupSize}" Width="200" Height="200" > + <ColorPicker Name="HSV" CurrentColor="{²../../../CurrentColor}" Background="Onyx" BubbleEvents="None"/> + <ColorPicker IsVisible="false" Name="Names" CurrentColor="{²../../../CurrentColor}" Height="Stretched" Background="Onyx"> + <Template> + <ListBox Width="Stretched" Data="{./AvailableColors}" SelectedItemChanged="./onSelectedItemChanged"> + <Template> + <Scroller Name="scroller1" Margin="5" ClipToClientRect="true" Background="Onyx"> + <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> + </Template> + </ColorPicker> + </TabView> +</Popper> +</Template> +</ColorPicker>
\ No newline at end of file |