diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2020-06-13 08:21:47 +0200 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2020-06-13 08:21:47 +0200 |
| commit | 12ebb45ce26748e415f01c12c5c76b6918484c2f (patch) | |
| tree | 789c60283fa3d41de4c323847697dc0003746e25 /Samples | |
| parent | 46104d8683a8b4ada088e1a023480bb64299acaf (diff) | |
focus and windows move and size handles
Diffstat (limited to 'Samples')
| -rw-r--r-- | Samples/HelloWorld/ui/helloworld.crow | 41 | ||||
| -rw-r--r-- | Samples/ShowCase/ui/focused.crow | 17 | ||||
| -rw-r--r-- | Samples/ShowCase/ui/helloworld.crow | 8 | ||||
| -rw-r--r-- | Samples/ShowCase/ui/showcase.crow | 2 | ||||
| -rw-r--r-- | Samples/common/ui/Interfaces/Divers/testSlider.crow | 2 |
5 files changed, 21 insertions, 49 deletions
diff --git a/Samples/HelloWorld/ui/helloworld.crow b/Samples/HelloWorld/ui/helloworld.crow index 82fd4ab5..fe05d1e2 100644 --- a/Samples/HelloWorld/ui/helloworld.crow +++ b/Samples/HelloWorld/ui/helloworld.crow @@ -1,39 +1,2 @@ -<Container Background="Onyx"> - <VerticalStack Background="Jet" Fit="true" Margin="1" Spacing="1"> - <Gauge Width="200" Height="10" Background="RoyalBlue" Value="50" CornerRadius="5"/> - <NumericControl Width="200" Height="10" Value="40"> - <Template> - <Gauge Maximum="{./Maximum}" Foreground="Black" BorderWidth="1" Background="RoyalBlue" Value="{./Value}" CornerRadius="5"/> - </Template> - </NumericControl> - <Gauge Width="10" Height="100" Background="RoyalBlue" Value="50" CornerRadius="5" Orientation="Vertical"/> - <HorizontalStack Width="400" Height="300"> - <Scroller Name="scroller1" Background="White" - Margin="2" ScrollY="{../scrollbar1.Value}" - ValueChanged="./_scroller_ValueChanged"> - <Widget VerticalAlignment="Top" Background="vgradient|0:1,0,0,1|1:0,1,0,1" Width="1000" Height="1000"/> - </Scroller> - <Slider Template="#Crow.VScrollBar.template" Name="scrollbar1" Value="{../scroller1.ScrollY}" - LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30" Height="Stretched" - CursorSize="{../scroller1.ChildHeightRatio}" - Maximum="{../scroller1.MaxScrollY}" Orientation="Vertical" Width="14" > - <Template> - <Border BorderWidth="1" Foreground="{./Foreground}" Background="{./Background}"> - <GenericStack Orientation="{./Orientation}" Spacing="0"> - <Shape Style="ArrowBut" MouseDown="./OnDecrease" - Height="10" Size="10,10" Path="M 4.5,0.5 L 9.5,9.5 L 0.5,9.5 Z F"/> - <Gauge Name="Slider" - Orientation="{./Orientation}" - Value="{²./Value}" - Maximum="{./Maximum}" - Height="{./HeightPolicy}" Width="{./WidthPolicy}" - Background="RoyalBlue" Foreground="{./Foreground}"/> - <Shape Style="ArrowBut" MouseDown="./OnIncrease" - Height="10" Size="10,10" Path="M 0.5,0.5 L 9.5,0.5 L 4.5,9.5 Z F"/> - </GenericStack> - </Border> - </Template> - </Slider> - </HorizontalStack> - </VerticalStack> -</Container>
\ No newline at end of file +<?xml version="1.0"?> +<Label Text="Hello World"/>
\ No newline at end of file diff --git a/Samples/ShowCase/ui/focused.crow b/Samples/ShowCase/ui/focused.crow new file mode 100644 index 00000000..755345ae --- /dev/null +++ b/Samples/ShowCase/ui/focused.crow @@ -0,0 +1,17 @@ +<Window Width="80%" Movable="false"> + <VerticalStack> + <HorizontalStack Height="Fit"> + <Label Text="Hover:" Width="50" Foreground="Grey"/> + <Label Text="{HoverWidget}" Font="mono, 8"/> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Text="Focus:" Width="50" Foreground="Grey"/> + <Label Text="{FocusedWidget}" Font="mono, 8"/> + </HorizontalStack> + <HorizontalStack Height="Fit"> + <Label Text="Active:" Width="50" Foreground="Grey"/> + <Label Text="{ActiveWidget}" Font="mono, 8"/> + </HorizontalStack> + </VerticalStack> +</Window> + diff --git a/Samples/ShowCase/ui/helloworld.crow b/Samples/ShowCase/ui/helloworld.crow deleted file mode 100644 index 1d1a3515..00000000 --- a/Samples/ShowCase/ui/helloworld.crow +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0"?> -<Window Caption="Hello World" Icon="#Crow.Icons.crow.svg" Width="40%" Height="40%" CornerRadius="5"> - <VerticalStack> - <Label Text="Hello World" Font="mono, 20"/> - <Image Path="#Crow.Icons.crow.svg"/> - </VerticalStack> -</Window> - diff --git a/Samples/ShowCase/ui/showcase.crow b/Samples/ShowCase/ui/showcase.crow index 5405a5ef..83700273 100644 --- a/Samples/ShowCase/ui/showcase.crow +++ b/Samples/ShowCase/ui/showcase.crow @@ -24,7 +24,7 @@ ValueChanged="./_scroller_ValueChanged"> <TextBox VerticalAlignment="Top" Text="{²Source}" Multiline="true" TextAlignment="TopLeft" - Font="Courriernew 10"/> + Font="mono 10"/> </Scroller> <ScrollBar Name="scrollbar1" Value="{../scroller1.ScrollY}" LargeIncrement="{../scroller1.PageHeight}" SmallIncrement="30" diff --git a/Samples/common/ui/Interfaces/Divers/testSlider.crow b/Samples/common/ui/Interfaces/Divers/testSlider.crow index a4caf818..a2fb0862 100644 --- a/Samples/common/ui/Interfaces/Divers/testSlider.crow +++ b/Samples/common/ui/Interfaces/Divers/testSlider.crow @@ -1,7 +1,7 @@ <?xml version="1.0"?> <HorizontalStack Margin="50"> <VerticalStack Spacing="10" Width="50%"> - <Slider Height="20" Width="Stretched"/> + <Slider Background="DarkGrey" Height="20" Width="Stretched"/> <Slider Background="RoyalBlue" Height="50" Width="Stretched" CursorSize="50"> <Template> <Group Background="DarkGrey" > |