From ffb850e567132718def019b64494883dc9f30511 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jean-Philippe=20Bruy=C3=A8re?= Date: Mon, 19 Apr 2021 17:23:37 +0200 Subject: [PATCH] dont set handled=true for mouseWheen in single line textbox --- Crow/Crow.csproj | 7 +++++++ Crow/Default.style | 3 ++- Crow/src/Widgets/TextBox.cs | 6 ++++-- Samples/DebugLogAnalyzer/src/DebugInterfaceWidget.cs | 7 +++---- Samples/dragNdrop/dragNdrop.cs | 2 +- 5 files changed, 17 insertions(+), 8 deletions(-) diff --git a/Crow/Crow.csproj b/Crow/Crow.csproj index 7004eb0d..083b1989 100644 --- a/Crow/Crow.csproj +++ b/Crow/Crow.csproj @@ -43,6 +43,13 @@ + + $(DefineConstants);VKVG + + + + + $(DefineConstants);STB_SHARP diff --git a/Crow/Default.style b/Crow/Default.style index 64406362..9f206629 100644 --- a/Crow/Default.style +++ b/Crow/Default.style @@ -302,10 +302,11 @@ TableRow { } TableHeaderRow { Height="Fit"; + Background="Black"; Width="Stretched";//TODO:Force it to stretched programmatically } TableHeaderLabel { Margin = "1"; - Background = "Jet"; + //Background = "Jet"; Foreground = "LightGrey"; } \ No newline at end of file diff --git a/Crow/src/Widgets/TextBox.cs b/Crow/src/Widgets/TextBox.cs index bf1678f4..ece9adc0 100644 --- a/Crow/src/Widgets/TextBox.cs +++ b/Crow/src/Widgets/TextBox.cs @@ -134,12 +134,14 @@ namespace Crow /// Process scrolling vertically, or if shift is down, vertically public override void onMouseWheel (object sender, MouseWheelEventArgs e) { + e.Handled = true; if (IFace.Shift) ScrollX += e.Delta * MouseWheelSpeed; - else + else if (Multiline) ScrollY -= e.Delta * MouseWheelSpeed; + else + e.Handled = false; - e.Handled = true; base.onMouseWheel (sender, e); } public override void onMouseMove (object sender, MouseMoveEventArgs e) { diff --git a/Samples/DebugLogAnalyzer/src/DebugInterfaceWidget.cs b/Samples/DebugLogAnalyzer/src/DebugInterfaceWidget.cs index 2dba0601..c8b27d7d 100644 --- a/Samples/DebugLogAnalyzer/src/DebugInterfaceWidget.cs +++ b/Samples/DebugLogAnalyzer/src/DebugInterfaceWidget.cs @@ -9,7 +9,6 @@ using System.Runtime.Loader; using System.IO; using Crow.Cairo; using System.Diagnostics; -using CrowDbgShared; using System.Collections.Generic; using Crow.DebugLogger; using System.Linq; @@ -34,8 +33,8 @@ namespace Crow Func delKeyDown, delKeyUp; Action delResetDirtyState; Action delResetDebugger; - Action delSaveDebugLog; - IntPtrGetterDelegate delGetSurfacePointer; + Action delSaveDebugLog; + Func delGetSurfacePointer; Action delSetSource; FieldInfo fiDbg_IncludeEvents, fiDbg_DiscardEvents, fiDbg_ConsoleOutput; @@ -237,7 +236,7 @@ namespace Crow dbgIFace, dbgIfaceType.GetMethod("OnKeyPress")); - delGetSurfacePointer = (IntPtrGetterDelegate)Delegate.CreateDelegate(typeof(IntPtrGetterDelegate), + delGetSurfacePointer = (Func)Delegate.CreateDelegate(typeof(Func), dbgIFace, dbgIfaceType.GetProperty("SurfacePointer").GetGetMethod()); delSetSource = (Action)Delegate.CreateDelegate(typeof(Action), dbgIFace, dbgIfaceType.GetProperty("Source").GetSetMethod()); diff --git a/Samples/dragNdrop/dragNdrop.cs b/Samples/dragNdrop/dragNdrop.cs index 89785c82..2ca41357 100644 --- a/Samples/dragNdrop/dragNdrop.cs +++ b/Samples/dragNdrop/dragNdrop.cs @@ -34,7 +34,7 @@ namespace tests gr.SetSource (e.DragSource.bmp, 0, 0); gr.Paint (); } - CreateDragImage (dragImg) + CreateDragImage (dragImg, r); /*lock (UpdateMutex) startGroup.RemoveChild (e.DragSource);*/ } -- 2.47.3