mirror of
https://github.com/cefsharp/CefSharp.git
synced 2026-12-05 19:54:53 +00:00
Directly access BrowserSettings as they're internal (extra property and wrapper seems redundant)
This commit is contained in:
@@ -82,13 +82,6 @@ namespace CefSharp
|
||||
!BrowserSettings() { delete _browserSettings; _isFinalized = true; }
|
||||
~BrowserSettings() { if (!_isFinalized) this->!BrowserSettings(); }
|
||||
|
||||
// CefBrowserSettings is private causing whole field to be private
|
||||
// exposing void* as a workaround
|
||||
property void* _internalBrowserSettings
|
||||
{
|
||||
void* get() { return _browserSettings; }
|
||||
}
|
||||
|
||||
property String^ StandardFontFamily
|
||||
{
|
||||
String^ get() { return StringUtils::ToClr(_browserSettings->standard_font_family); }
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace CefSharp
|
||||
CefString addressNative = StringUtils::ToNative(address);
|
||||
|
||||
if (!CefBrowserHost::CreateBrowser(window, _clientAdapter.get(), addressNative,
|
||||
*(CefBrowserSettings*) browserSettings->_internalBrowserSettings, NULL))
|
||||
*browserSettings->_browserSettings, NULL))
|
||||
{
|
||||
throw gcnew InvalidOperationException( "Failed to create offscreen browser. Call Cef.Initialize() first." );
|
||||
}
|
||||
@@ -647,7 +647,7 @@ namespace CefSharp
|
||||
CefString addressNative = StringUtils::ToNative(address);
|
||||
|
||||
CefBrowserHost::CreateBrowser(window, _clientAdapter.get(), addressNative,
|
||||
*(CefBrowserSettings*)browserSettings->_internalBrowserSettings, NULL);
|
||||
*browserSettings->_browserSettings, NULL);
|
||||
}
|
||||
|
||||
void Resize(int width, int height)
|
||||
|
||||
Reference in New Issue
Block a user