diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-12-05 00:37:10 +0100 |
|---|---|---|
| committer | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2018-12-05 00:37:10 +0100 |
| commit | 78592468fe75f09299e12d8a8fbb94635a2befd6 (patch) | |
| tree | 0b38ad59d17393e5ad44a3980962bc30e283225e | |
| parent | 9d381671ec0b1266448eddbf4c4935cdc7d23a9f (diff) | |
divers
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | Crow.csproj | 3 | ||||
| -rw-r--r-- | Crow.sln | 1 | ||||
| -rwxr-xr-x | Properties/AssemblyInfo.cs | 2 | ||||
| -rwxr-xr-x | Templates/DockWindow.template | 11 | ||||
| -rw-r--r-- | src/Gradient.cs | 5 | ||||
| -rw-r--r-- | src/GraphicObjects/PrivateContainer.cs | 4 | ||||
| -rw-r--r-- | src/Interface.cs | 7 | ||||
| -rw-r--r-- | src/backends/xlib/XLibBackend.cs | 4 |
9 files changed, 24 insertions, 14 deletions
@@ -4,6 +4,7 @@ Crow.userprefs Debug packages *.nupkg +*.user /GOLib.suo /tmp /bin/* diff --git a/Crow.csproj b/Crow.csproj index 0afb1db9..f181f154 100644 --- a/Crow.csproj +++ b/Crow.csproj @@ -32,7 +32,7 @@ <CheckForOverflowUnderflow>true</CheckForOverflowUnderflow> <Optimize>false</Optimize> <OutputPath>$(SolutionDir)build\Debug</OutputPath> - <DefineConstants>DEBUG_DRAGNDROP0;DEBUG_LOG0;XLIB_BACKEND0;DESIGN_MODE;DEBUG_UPDATE0;DEBUG_FOCUS0;DEBUG_DISPOSE0;TRACE0;DEBUG;MEASURE_TIME;DEBUG_LOAD0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0</DefineConstants> + <DefineConstants>DEBUG_DRAGNDROP0;DEBUG_LOG;XLIB_BACKEND0;DESIGN_MODE;DEBUG_UPDATE0;DEBUG_FOCUS0;DEBUG_DISPOSE0;TRACE0;DEBUG;MEASURE_TIME;DEBUG_LOAD0;DEBUG_BINDING0;DEBUG_CLIP_RECTANGLE0</DefineConstants> <EnvironmentVariables> <EnvironmentVariables> <Variable name="MONO_CAIRO_DEBUG_DISPOSE" value="1" /> @@ -235,6 +235,7 @@ <Compile Include="src\backends\xlib\X11Keyboard.cs" /> <Compile Include="src\backends\xlib\XLibBackend.cs" /> <Compile Include="src\debug\DbgLogViewer.cs" /> + <Compile Include="src\debug\DbgEventTypeColors.cs" /> </ItemGroup> <ItemGroup> <Reference Include="System" /> @@ -18,6 +18,7 @@ Global {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Any CPU.ActiveCfg = Release|Any CPU {74289092-9F70-4941-AFCB-DFD7BE2140B6}.Release|Any CPU.Build.0 = Release|Any CPU {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Debug|Any CPU.Build.0 = Debug|Any CPU {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Release|Any CPU.ActiveCfg = Release|Any CPU {B6D911CD-1D09-42FC-B300-9187190F2AE1}.Release|Any CPU.Build.0 = Release|Any CPU {C2980F9B-4798-4C05-99E2-E174810F7C7B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs index 3e2b7331..a799c754 100755 --- a/Properties/AssemblyInfo.cs +++ b/Properties/AssemblyInfo.cs @@ -49,5 +49,5 @@ using System.Runtime.CompilerServices; // if desired. See the Mono documentation for more information about signing. //[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("crow.key")] +//[assembly: AssemblyKeyFile("crow.key")] diff --git a/Templates/DockWindow.template b/Templates/DockWindow.template index f407502a..b293e536 100755 --- a/Templates/DockWindow.template +++ b/Templates/DockWindow.template @@ -5,11 +5,14 @@ MouseEnter="./onBorderMouseEnter" MouseLeave="./onBorderMouseLeave"> <VerticalStack Spacing="0"> - <HorizontalStack Visible="{./IsDocked}" Height="Fit" Margin="1" Background="Grey"> + <HorizontalStack Visible="{./IsDocked}" Height="Fit" Margin="0" Background="Black"> <Label Text="{./Caption}" TextAlignment="Left" Width="Stretched" - Foreground="Black" /> - <Image Width="10" Height="10" Focusable="true" Margin="0" Path="#Crow.Images.Icons.exit2.svg" + Foreground="White" /> + <Border CornerRadius="6" BorderWidth="1" Foreground="Transparent" Height="10" Width="10" + MouseEnter="{Foreground=White}" MouseLeave="{Foreground=Transparent}"> + <Image Focusable="true" Name="Image" Margin="0" Path="#Crow.Images.Icons.exit2.svg" MouseClick="./butQuitPress"/> + </Border> </HorizontalStack> <HorizontalStack Background="vgradient|0:0.5,0.6,0.5,0.5|1:0.2,0.3,0.3,0.7" Name="hs" Margin="0" Spacing="0" Height="Fit" Visible="{./IsFloating}"> @@ -23,6 +26,6 @@ </Border> <GraphicObject Width="5"/> </HorizontalStack> - <Container Name="Content" MinimumSize="50,50"/> + <Container Name="Content" MinimumSize="50,50" Background="0.1,0.1,0.1,0.4"/> </VerticalStack> </Border> diff --git a/src/Gradient.cs b/src/Gradient.cs index 0806e885..2630c42a 100644 --- a/src/Gradient.cs +++ b/src/Gradient.cs @@ -96,8 +96,11 @@ namespace Crow throw new NotImplementedException (); } - foreach (ColorStop cs in Stops) + foreach (ColorStop cs in Stops) { + if (cs == null) + continue; grad.AddColorStop (cs.Offset, cs.Color); + } ctx.SetSource (grad); grad.Dispose (); diff --git a/src/GraphicObjects/PrivateContainer.cs b/src/GraphicObjects/PrivateContainer.cs index 41918bc8..0f9b0c59 100644 --- a/src/GraphicObjects/PrivateContainer.cs +++ b/src/GraphicObjects/PrivateContainer.cs @@ -51,7 +51,9 @@ namespace Crow go = null; if (base.FindByDesignID (designID, out go)) return true; - return (bool)child?.FindByDesignID (designID, out go); + if (child == null) + return false; + return child.FindByDesignID (designID, out go); } #endif protected GraphicObject child; diff --git a/src/Interface.cs b/src/Interface.cs index 3c586685..f2d6a1ce 100644 --- a/src/Interface.cs +++ b/src/Interface.cs @@ -129,8 +129,8 @@ namespace Crow Keyboard.KeyUp += Keyboard_KeyUp; Keyboard.KeyPress += Keyboard_KeyPress; - //initTooltip (); - //initContextMenus (); + initTooltip (); + initContextMenus (); running = true; @@ -173,8 +173,7 @@ namespace Crow { while (running) { Update (); - - Thread.Sleep (1); + Thread.Sleep (5); } } diff --git a/src/backends/xlib/XLibBackend.cs b/src/backends/xlib/XLibBackend.cs index 81500c03..a123e204 100644 --- a/src/backends/xlib/XLibBackend.cs +++ b/src/backends/xlib/XLibBackend.cs @@ -35,9 +35,9 @@ namespace Crow.XLib [DllImportAttribute("X11")] static extern int XInitThreads(); [DllImportAttribute("X11")] - static extern IntPtr XOpenDisplay(IntPtr displayName); + internal static extern IntPtr XOpenDisplay(IntPtr displayName); [DllImportAttribute("X11")] - static extern IntPtr XCloseDisplay(IntPtr disp); + internal static extern IntPtr XCloseDisplay(IntPtr disp); [DllImportAttribute("X11")] static extern Int32 XDefaultScreen(IntPtr disp); [DllImportAttribute("X11")] |