mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Issue #1659:
* remove broken sample text box * activate translation on dialog
This commit is contained in:
@ -39,20 +39,6 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter
|
|||||||
Height = 15
|
Height = 15
|
||||||
Caption = 'Style:'
|
Caption = 'Style:'
|
||||||
end
|
end
|
||||||
object lblSample: TLabel
|
|
||||||
Left = 277
|
|
||||||
Top = 175
|
|
||||||
Width = 156
|
|
||||||
Height = 26
|
|
||||||
Alignment = taCenter
|
|
||||||
Anchors = [akLeft, akTop, akRight]
|
|
||||||
AutoSize = False
|
|
||||||
Caption = 'Example text'
|
|
||||||
Color = clBtnFace
|
|
||||||
ParentColor = False
|
|
||||||
Transparent = False
|
|
||||||
Layout = tlCenter
|
|
||||||
end
|
|
||||||
object comboHighlighter: TComboBox
|
object comboHighlighter: TComboBox
|
||||||
Left = 8
|
Left = 8
|
||||||
Top = 8
|
Top = 8
|
||||||
@ -101,7 +87,7 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter
|
|||||||
Cancel = True
|
Cancel = True
|
||||||
Caption = 'Cancel'
|
Caption = 'Cancel'
|
||||||
ModalResult = 2
|
ModalResult = 2
|
||||||
TabOrder = 8
|
TabOrder = 7
|
||||||
end
|
end
|
||||||
object btnOK: TButton
|
object btnOK: TButton
|
||||||
Left = 196
|
Left = 196
|
||||||
@ -112,7 +98,7 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter
|
|||||||
Caption = 'OK'
|
Caption = 'OK'
|
||||||
Default = True
|
Default = True
|
||||||
ModalResult = 1
|
ModalResult = 1
|
||||||
TabOrder = 7
|
TabOrder = 6
|
||||||
OnClick = SaveSettings
|
OnClick = SaveSettings
|
||||||
end
|
end
|
||||||
object editBackground: TButtonedEdit
|
object editBackground: TButtonedEdit
|
||||||
@ -143,16 +129,6 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter
|
|||||||
OnExit = Modified
|
OnExit = Modified
|
||||||
OnRightButtonClick = editColorRightButtonClick
|
OnRightButtonClick = editColorRightButtonClick
|
||||||
end
|
end
|
||||||
object pnlSample: TPanel
|
|
||||||
Left = 277
|
|
||||||
Top = 136
|
|
||||||
Width = 156
|
|
||||||
Height = 33
|
|
||||||
Caption = 'Example text'
|
|
||||||
Color = clGradientActiveCaption
|
|
||||||
ParentBackground = False
|
|
||||||
TabOrder = 6
|
|
||||||
end
|
|
||||||
object btnApply: TButton
|
object btnApply: TButton
|
||||||
Left = 358
|
Left = 358
|
||||||
Top = 216
|
Top = 216
|
||||||
@ -160,7 +136,7 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter
|
|||||||
Height = 25
|
Height = 25
|
||||||
Anchors = [akRight, akBottom]
|
Anchors = [akRight, akBottom]
|
||||||
Caption = 'Apply'
|
Caption = 'Apply'
|
||||||
TabOrder = 9
|
TabOrder = 8
|
||||||
OnClick = SaveSettings
|
OnClick = SaveSettings
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -5,10 +5,10 @@ interface
|
|||||||
uses
|
uses
|
||||||
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
|
||||||
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.GraphUtil, System.Math,
|
Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.GraphUtil, System.Math,
|
||||||
System.StrUtils, SynEditHighlighter, gnugettext, apphelpers;
|
System.StrUtils, SynEditHighlighter, gnugettext, apphelpers, extra_controls;
|
||||||
|
|
||||||
type
|
type
|
||||||
TfrmCustomizeHighlighter = class(TForm)
|
TfrmCustomizeHighlighter = class(TExtForm)
|
||||||
comboHighlighter: TComboBox;
|
comboHighlighter: TComboBox;
|
||||||
listboxAttributes: TListBox;
|
listboxAttributes: TListBox;
|
||||||
lblBackground: TLabel;
|
lblBackground: TLabel;
|
||||||
@ -20,9 +20,7 @@ type
|
|||||||
btnOK: TButton;
|
btnOK: TButton;
|
||||||
editBackground: TButtonedEdit;
|
editBackground: TButtonedEdit;
|
||||||
editForeground: TButtonedEdit;
|
editForeground: TButtonedEdit;
|
||||||
pnlSample: TPanel;
|
|
||||||
btnApply: TButton;
|
btnApply: TButton;
|
||||||
lblSample: TLabel;
|
|
||||||
procedure listboxAttributesClick(Sender: TObject);
|
procedure listboxAttributesClick(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure comboHighlighterSelect(Sender: TObject);
|
procedure comboHighlighterSelect(Sender: TObject);
|
||||||
@ -37,7 +35,6 @@ type
|
|||||||
FOnChange: TNotifyEvent;
|
FOnChange: TNotifyEvent;
|
||||||
procedure SetFriendlyLanguageName(FriendlyLanguageName: String);
|
procedure SetFriendlyLanguageName(FriendlyLanguageName: String);
|
||||||
function GetFriendlyLanguageName: String;
|
function GetFriendlyLanguageName: String;
|
||||||
procedure UpdateSampleBox;
|
|
||||||
public
|
public
|
||||||
{ Public-Deklarationen }
|
{ Public-Deklarationen }
|
||||||
property FriendlyLanguageName: String read GetFriendlyLanguageName write SetFriendlyLanguageName;
|
property FriendlyLanguageName: String read GetFriendlyLanguageName write SetFriendlyLanguageName;
|
||||||
@ -73,7 +70,6 @@ begin
|
|||||||
FAttr.Style := FAttr.Style + [fsItalic]
|
FAttr.Style := FAttr.Style + [fsItalic]
|
||||||
else
|
else
|
||||||
FAttr.Style := FAttr.Style - [fsItalic];
|
FAttr.Style := FAttr.Style - [fsItalic];
|
||||||
UpdateSampleBox;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmCustomizeHighlighter.comboHighlighterSelect(Sender: TObject);
|
procedure TfrmCustomizeHighlighter.comboHighlighterSelect(Sender: TObject);
|
||||||
@ -159,7 +155,6 @@ begin
|
|||||||
editForeground.Enabled := AttrSelected;
|
editForeground.Enabled := AttrSelected;
|
||||||
chkBold.Enabled := AttrSelected;
|
chkBold.Enabled := AttrSelected;
|
||||||
chkItalic.Enabled := AttrSelected;
|
chkItalic.Enabled := AttrSelected;
|
||||||
pnlSample.Enabled := AttrSelected;
|
|
||||||
// Overtake values
|
// Overtake values
|
||||||
if AttrSelected then begin
|
if AttrSelected then begin
|
||||||
editBackground.Text := IfThen(FAttr.Background <> clNone, ColorToWebColorStr(FAttr.Background), '');
|
editBackground.Text := IfThen(FAttr.Background <> clNone, ColorToWebColorStr(FAttr.Background), '');
|
||||||
@ -173,7 +168,6 @@ begin
|
|||||||
chkBold.Checked := False;
|
chkBold.Checked := False;
|
||||||
chkItalic.Checked := False;
|
chkItalic.Checked := False;
|
||||||
end;
|
end;
|
||||||
UpdateSampleBox;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmCustomizeHighlighter.SetFriendlyLanguageName(FriendlyLanguageName: String);
|
procedure TfrmCustomizeHighlighter.SetFriendlyLanguageName(FriendlyLanguageName: String);
|
||||||
@ -188,21 +182,5 @@ begin
|
|||||||
Result := FHighlighter.FriendlyLanguageName;
|
Result := FHighlighter.FriendlyLanguageName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmCustomizeHighlighter.UpdateSampleBox;
|
|
||||||
var
|
|
||||||
AttrSelected: Boolean;
|
|
||||||
begin
|
|
||||||
// Visualize current colors
|
|
||||||
AttrSelected := FAttr <> nil;
|
|
||||||
pnlSample.Color := TColor(IfThen(AttrSelected, FAttr.Background, clBtnFace));
|
|
||||||
pnlSample.Font.Color := TColor(IfThen(AttrSelected, FAttr.Foreground, clWindowText));
|
|
||||||
if AttrSelected then
|
|
||||||
pnlSample.Font.Style := FAttr.Style;
|
|
||||||
|
|
||||||
lblSample.Color := TColor(IfThen(AttrSelected, FAttr.Background, clBtnFace));
|
|
||||||
lblSample.Font.Color := TColor(IfThen(AttrSelected, FAttr.Foreground, clWindowText));
|
|
||||||
if AttrSelected then
|
|
||||||
lblSample.Font.Style := FAttr.Style;
|
|
||||||
end;
|
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Reference in New Issue
Block a user