amaitland
2020-08-26 14:54:31 +10:00
parent 8d1afada20
commit 89e95ef3be
4 changed files with 58 additions and 0 deletions
@@ -499,6 +499,7 @@ void CefBrowserHostWrapper::ImeSetComposition(String^ text, cli::array<Compositi
c.color = underline.Color;
c.background_color = underline.BackgroundColor;
c.thick = (int)underline.Thick;
c.style = (cef_composition_underline_style_t)underline.Style;
underlinesVector.push_back(c);
}
}
+1
View File
@@ -104,6 +104,7 @@
<Compile Include="CdmRegistration.cs" />
<Compile Include="DefaultApp.cs" />
<Compile Include="DevToolsExtensions.cs" />
<Compile Include="Enums\CompositionUnderlineStyle.cs" />
<Compile Include="Enums\SchemeOptions.cs" />
<Compile Include="Internals\CefThread.cs" />
<Compile Include="Internals\FreezableBase.cs" />
@@ -0,0 +1,29 @@
// Copyright © 2020 The CefSharp Authors. All rights reserved.
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
namespace CefSharp.Enums
{
/// <summary>
/// Composition underline style.
/// </summary>
public enum CompositionUnderlineStyle
{
/// <summary>
/// Solid
/// </summary>
Solid,
/// <summary>
/// Dot
/// </summary>
Dot,
/// <summary>
/// Dash
/// </summary>
Dash,
/// <summary>
/// None
/// </summary>
None
}
}
+27
View File
@@ -2,6 +2,8 @@
//
// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
using CefSharp.Enums;
namespace CefSharp.Structs
{
/// <summary>
@@ -30,6 +32,11 @@ namespace CefSharp.Structs
/// </summary>
public bool Thick { get; private set; }
/// <summary>
/// Style
/// </summary>
public CompositionUnderlineStyle Style { get; private set; }
/// <summary>
/// Constructor.
/// </summary>
@@ -47,6 +54,26 @@ namespace CefSharp.Structs
BackgroundColor = backGroundColor;
Thick = thick;
}
/// <summary>
/// Constructor.
/// </summary>
/// <param name="range">Underline character range.</param>
/// <param name="color">Text color. 32-bit ARGB color value, not premultiplied. The color components are always in a known order.
/// Equivalent to the SkColor type.</param>
/// <param name="backGroundColor">Background color. 32-bit ARGB color value, not premultiplied. The color components are always in
/// a known order. Equivalent to the SkColor type.</param>
/// <param name="thick">True for thickunderline.</param>
/// <param name="style">Style</param>
public CompositionUnderline(Range range, uint color, uint backGroundColor, bool thick, CompositionUnderlineStyle style)
: this()
{
Range = range;
Color = color;
BackgroundColor = backGroundColor;
Thick = thick;
Style = style;
}
}
}