]> O.S.I.I.S - jp/crowedit.git/commitdiff
context menu default template override
authorJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 8 Jul 2025 06:40:25 +0000 (08:40 +0200)
committerJean-Philippe Bruyère <jp_bruyere@hotmail.com>
Tue, 8 Jul 2025 06:42:42 +0000 (08:42 +0200)
CrowEditBase/ui/DefaultTemplateOverrides/ContextMenu.template [new file with mode: 0644]
CrowEditBase/ui/slider.template [new file with mode: 0644]
CrowEditBase/ui/slider.tmp [deleted file]
plugins/CENetcoreDbgPlugin/ui/winDebugging.crow
plugins/CENugetPlugin/ui/winConfiguration.crow
plugins/CERoslynPlugin/ui/winConfiguration.crow
src/CrowEdit.cs
ui/EditorOptions.crow
ui/windows/winPlugins.crow
ui/windows/winServices.crow

diff --git a/CrowEditBase/ui/DefaultTemplateOverrides/ContextMenu.template b/CrowEditBase/ui/DefaultTemplateOverrides/ContextMenu.template
new file mode 100644 (file)
index 0000000..e517569
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<MenuItem MinimumSize="20,20" Height="Fit" Width="Fit" Caption="Context Menu" Data="{ContextCommands}" Orientation="Vertical"
+       IsOpened ="true" Visible="{/IsOpened}">
+       <Template>              
+               <Border Background="0.2,0.2,0.2,0.8" Foreground="Black" CornerRadius="2">                       
+                       <GenericStack Height="Fit" VerticalAlignment="Top" Orientation="{./Orientation}" Name="ItemsContainer" Margin="5"/>                     
+               </Border>               
+       </Template>
+       <ItemTemplate>
+               <MenuItem Command="{}" Width="150" PopWidth="120" IsEnabled="{CanExecute}">
+                       <Template>
+                               <Popper Font="{./Font}" Caption="{./Caption}"  Background="{./Background}" PopDirection="{./PopDirection}"
+                                       Foreground = "{./Foreground}" CanPop="{./HasChildren}" MouseDown="./onMI_Click" BubbleEvents="All"
+                                       IsPopped="{²./IsOpened}" PopWidth="{./PopWidth}" PopHeight="{./PopHeight}">
+                                       <Template>
+                                               <Border Name="border1"
+                                                               CornerRadius="0"
+                                                               MouseEnter="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"
+                                                               MouseLeave="{Foreground=Transparent}"
+                                                               MouseDown="{Foreground=vgradient|0:Black|0.05:Grey|0.85:Grey|1:White}"
+                                                               MouseUp="{Foreground=vgradient|0:White|0.2:Grey|0.9:Grey|1:Black}"
+                                                               MinimumSize = "60,0"
+                                                               Foreground="Transparent"
+                                                               Background="{./Background}">
+                                                               <HorizontalStack Spacing="5">
+                                                                       <Image Height="14" Width="14" Picture="{Icon}" />
+                                                                       <Label Text="{./Caption}"
+                                                                               Foreground="{./Foreground}"
+                                                                               Margin="1" HorizontalAlignment="Left"
+                                                                               Font="{./Font}" />
+                                                               </HorizontalStack>
+                                               </Border>
+                                       </Template>
+                                       <Border Foreground="DimGrey" Width="{../PopWidth}" Height="{../PopHeight}" Background="DimGrey">
+                                               <VerticalStack Name="ItemsContainer"/>
+                                       </Border>
+                               </Popper>
+                       </Template>
+               </MenuItem>
+       </ItemTemplate>
+</MenuItem>
+
diff --git a/CrowEditBase/ui/slider.template b/CrowEditBase/ui/slider.template
new file mode 100644 (file)
index 0000000..d60e66c
--- /dev/null
@@ -0,0 +1,11 @@
+<VerticalStack Background="{./Background}" Margin="5">
+       <Label Text="{./Caption}"/>
+       <Group Height="20">
+               <Gauge Height="50%" Foreground="${ControlHighlight}" Background="Onyx" Value="{./Value}" Maximum="{./Maximum}" Minimum="{Minimum}" Orientation="{./Orientation}"/>
+               <Border Name="Cursor" Background="White" BorderWidth="2" Foreground="Grey"
+                               MouseEnter="{Foreground=${ControlHighlight}}"
+                               MouseLeave="{Foreground=Grey}" >
+                       <Label Text="{./Value}" Foreground="Black"/>
+               </Border>
+       </Group>
+</VerticalStack>
diff --git a/CrowEditBase/ui/slider.tmp b/CrowEditBase/ui/slider.tmp
deleted file mode 100644 (file)
index d60e66c..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-<VerticalStack Background="{./Background}" Margin="5">
-       <Label Text="{./Caption}"/>
-       <Group Height="20">
-               <Gauge Height="50%" Foreground="${ControlHighlight}" Background="Onyx" Value="{./Value}" Maximum="{./Maximum}" Minimum="{Minimum}" Orientation="{./Orientation}"/>
-               <Border Name="Cursor" Background="White" BorderWidth="2" Foreground="Grey"
-                               MouseEnter="{Foreground=${ControlHighlight}}"
-                               MouseLeave="{Foreground=Grey}" >
-                       <Label Text="{./Value}" Foreground="Black"/>
-               </Border>
-       </Group>
-</VerticalStack>
index 8bb379aab7f5e09988e417315bb12dd97d30f84a..96e0ea0adce100b3c75e30c0d0c1efff43d80fdf 100644 (file)
@@ -1,22 +1,34 @@
 <?xml version="1.0"?>
-<DockWindow Caption="Netcore Debugger">
-       <HorizontalStack Height="Fit" DataSource="{DbgSession}" Margin="0" Spacing="5">
+<Window Caption="Netcore Debugger" Height="Fit" Width="Fit" Background="DimGrey" AllowedStates="Normal" >
+       <Template>
+               <HorizontalStack Background="{./Background}" Width="Fit" Height="Fit" Margin="2" Spacing="4">
+                       <Image Path="#icons.move-arrows.svg" Margin="1" Name="MoveHandle" Height="14" Width="14" Background="Onyx" CornerRadius="0"/>
+                       <Container Name="Content" MinimumSize="0,0" />
+                       <ListBox Data="{./Commands}" Fit="true" VerticalAlignment="Top">
+                               <Template>
+                                       <HorizontalStack Name="ItemsContainer" />
+                               </Template>
+                               <ItemTemplate Path="#Crow.WindowButton.template"/>
+                       </ListBox>
+               </HorizontalStack>
+       </Template>
+       <HorizontalStack Height="Fit" DataSource="{DbgSession}" Margin="0" Spacing="2">
                <ListBox Data="{DebugCommands}" Fit="true">
                        <Template>
-                               <HorizontalStack Name="ItemsContainer" Spacing="5" />
+                               <HorizontalStack Name="ItemsContainer" Spacing="2" />
                        </Template>
                        <ItemTemplate>
-                               <Button Command="{}" MinimumSize="1,1" Width="40" Height="40" Background="vgradient|0:DimGrey|1:Black" CornerRadius="0" >
+                               <Button Command="{}" MinimumSize="1,1" Width="24" Height="24" Background="vgradient|0:DimGrey|1:Black" CornerRadius="0" >
                                        <Template>
-                                               <Border Style="ButtonBorder" Width="Stretched" Height="Stretched" Margin="10" Background="{./Background}" CornerRadius="{../CornerRadius}">
+                                               <Border Style="ButtonBorder" Width="Stretched" Height="Stretched" Margin="4" Background="{./Background}" CornerRadius="{../CornerRadius}">
                                                        <Image Path="{./Icon}" Tooltip="{./Caption}" Scaled="true" KeepProportions="true" Margin="0"/>
                                                </Border>
                                        </Template>
                                </Button>
                        </ItemTemplate>
                </ListBox >     
-               <Label Text="{CurrentState}" Margin="2"/>
+               <!--<Label Text="{CurrentState}" Margin="2"/>-->
        </HorizontalStack>
-</DockWindow>
+</Window>
 
 
index b5935f51e3cb070b83e58a2232c5efffd974f193..5e795664ace90dc00976588b68875c747403b2d8 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<DockWindow Caption="NetcoreDbg plugin configuration"  Width="80%" Height="400" Resizable="false">
+<DockWindow Caption="NetcoreDbg plugin configuration"  Width="600" Height="400" Resizable="false">
        <VerticalStack RootDataLevel="true" Margin="5">
                <HorizontalStack Height="Fit">
                        <Label Width="200" Text="Netcoredbg path"/>
index b8875bc39a70260c9190ff6388cc82c91bd04f4d..f2f3eb7c395e6e0aeaa984cb181804bd4c397572 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<DockWindow Caption="Roslyn plugin configuration"  Width="80%" Height="400" Resizable="false">
+<DockWindow Caption="Roslyn plugin configuration"  Width="600" Height="400" FreezeDockState="true">
        <VerticalStack RootDataLevel="true" Margin="5">
                <HorizontalStack Height="Fit">
                        <Label Width="200" Text="DotNet SDK folder"/>
index 99c1d6f09dbfbeb64b891524bafc984ccc22c7ec..b3f1e3d63524ec2468cdce353de2b024825d9999 100644 (file)
@@ -77,6 +77,8 @@ namespace CrowEdit
 
                        reloadSyntaxTheme ();
 
+                       reloadLogsConfigs ();
+                       
                        reloadWinConfigs ();
 
                        lock(UpdateMutex) {
@@ -88,7 +90,6 @@ namespace CrowEdit
                                }
                        }
 
-                       reloadLogsConfigs ();
 
                        reopenLastProjectList ();
 
index a8d36dfd71b773b76ab8b9f435ec3d58e4d85db9..2c49eac02a1c1cce232c3ddf86eb551be728750e 100644 (file)
@@ -6,10 +6,10 @@
                <CheckBox Caption="Indent With Spaces" IsChecked="{²IndentWithSpace}"/>
                <CheckBox Caption="Show White Spaces" IsChecked="{²ShowWhiteSpace}"/>
                <Spinner Caption="Tabulation Size" Value="{²TabulationSize}"/>
-               <Slider Template="#ui.slider.tmp" Height="Fit" Background="0.1,0.1,0.2,0.8"
+               <Slider Template="#ui.slider.template" Height="Fit" Background="0.1,0.1,0.2,0.8"
                                Minimum="1" Maximum="50" SmallIncrement="1" LargeIncrement="10"
                                Caption="Crow Update Interval (ms)" Value="{²CrowUpdateInterval}" />
-               <Slider Template="#ui.slider.tmp" Height="Fit" Background="0.1,0.1,0.2,0.8"
+               <Slider Template="#ui.slider.template" Height="Fit" Background="0.1,0.1,0.2,0.8"
                                Minimum="1" Maximum="50" SmallIncrement="1" LargeIncrement="10"
                                Caption="GLFW polling Interval (ms)" Value="{²CrowPollingInterval}" />
                <HorizontalStack Height="Fit">
index fc22be213ec081daaa1b5a3277496e949562c013..d3aa6cc79ba9b18fbd5e967a7e45b9024a111541 100644 (file)
@@ -1,5 +1,5 @@
 <?xml version="1.0"?>
-<DockWindow Caption="Available Plugins"  Width="70%" Height="80%" FreezeDockState="true">
+<DockWindow Caption="Available Plugins"  Width="300" Height="80%" FreezeDockState="true">
        <VerticalStack Margin="5">
                <Label Fit="true" Text="Plugins directory path:"/>
                <HorizontalStack Height="Fit">
index d7bcfc58385887a5a423803855c50094680268b5..728f49ccea460c1be12935239afbcb80ef2b0308 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
-<DockWindow Caption="Services"  Width="60%" >
-       <ListBox Data="{Services}" >
+<DockWindow Caption="Services"  Width="400" FreezeDockState="true">
+       <ListBox Data="{Services}" Margin="10">
                <ItemTemplate Path="#ui.Service.itmp"/>
        </ListBox>
 </DockWindow>