You've already forked CEF4Delphi
mirror of
https://github.com/salvadordf/CEF4Delphi.git
synced 2025-06-22 22:17:48 +02:00
Fixed UTF8 string conversion in SimpleBrowser for Linux
- Removed "cmem" and "interfaces" from the TinyBrowser2 demo for Linux. - Simplified the code of the TinyBrowser2 demo for Linux. - Added the workaround for the CEF focus issue to TChromiumWindow in Linux. - Set the result type of GetChildWindowHandle to LclType.THandle in FPC for TCEFWinControl, TCEFLinkedWindowParent and TChromiumWindow.
This commit is contained in:
@ -13,18 +13,18 @@ object Form1: TForm1
|
||||
LCLVersion = '2.0.10.0'
|
||||
object AddressPnl: TPanel
|
||||
Left = 0
|
||||
Height = 21
|
||||
Height = 25
|
||||
Top = 0
|
||||
Width = 1013
|
||||
Align = alTop
|
||||
BevelOuter = bvNone
|
||||
ClientHeight = 21
|
||||
ClientHeight = 25
|
||||
ClientWidth = 1013
|
||||
Enabled = False
|
||||
TabOrder = 0
|
||||
object AddressEdt: TEdit
|
||||
Left = 0
|
||||
Height = 21
|
||||
Height = 25
|
||||
Top = 0
|
||||
Width = 982
|
||||
Align = alClient
|
||||
@ -33,7 +33,7 @@ object Form1: TForm1
|
||||
end
|
||||
object GoBtn: TButton
|
||||
Left = 982
|
||||
Height = 21
|
||||
Height = 25
|
||||
Top = 0
|
||||
Width = 31
|
||||
Align = alRight
|
||||
@ -44,10 +44,11 @@ object Form1: TForm1
|
||||
end
|
||||
object ChromiumWindow1: TChromiumWindow
|
||||
Left = 0
|
||||
Height = 684
|
||||
Top = 21
|
||||
Height = 680
|
||||
Top = 25
|
||||
Width = 1013
|
||||
Align = alClient
|
||||
TabStop = True
|
||||
TabOrder = 1
|
||||
OnBeforeClose = ChromiumWindow1BeforeClose
|
||||
OnAfterCreated = ChromiumWindow1AfterCreated
|
||||
|
@ -64,7 +64,7 @@ type
|
||||
procedure FormCreate(Sender: TObject);
|
||||
|
||||
procedure ChromiumWindow1AfterCreated(Sender: TObject);
|
||||
procedure ChromiumWindow1BeforeClose(Sender: TObject);
|
||||
procedure ChromiumWindow1BeforeClose(Sender: TObject);
|
||||
private
|
||||
|
||||
protected
|
||||
@ -136,7 +136,7 @@ begin
|
||||
FClosing := False;
|
||||
|
||||
// The browser will load the URL in AddressEdt initially.
|
||||
ChromiumWindow1.ChromiumBrowser.DefaultURL := AddressEdt.Text;
|
||||
ChromiumWindow1.ChromiumBrowser.DefaultURL := UTF8Decode(AddressEdt.Text);
|
||||
end;
|
||||
|
||||
procedure TForm1.Chromium_OnBeforePopup(Sender: TObject;
|
||||
@ -160,7 +160,7 @@ end;
|
||||
procedure TForm1.GoBtnClick(Sender: TObject);
|
||||
begin
|
||||
// This will load the URL in the edit box
|
||||
ChromiumWindow1.LoadURL(AddressEdt.Text);
|
||||
ChromiumWindow1.LoadURL(UTF8Decode(AddressEdt.Text));
|
||||
end;
|
||||
|
||||
procedure TForm1.FormActivate(Sender: TObject);
|
||||
|
Reference in New Issue
Block a user