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
|
||||
Caption = 'Style:'
|
||||
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
|
||||
Left = 8
|
||||
Top = 8
|
||||
@ -101,7 +87,7 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter
|
||||
Cancel = True
|
||||
Caption = 'Cancel'
|
||||
ModalResult = 2
|
||||
TabOrder = 8
|
||||
TabOrder = 7
|
||||
end
|
||||
object btnOK: TButton
|
||||
Left = 196
|
||||
@ -112,7 +98,7 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter
|
||||
Caption = 'OK'
|
||||
Default = True
|
||||
ModalResult = 1
|
||||
TabOrder = 7
|
||||
TabOrder = 6
|
||||
OnClick = SaveSettings
|
||||
end
|
||||
object editBackground: TButtonedEdit
|
||||
@ -143,16 +129,6 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter
|
||||
OnExit = Modified
|
||||
OnRightButtonClick = editColorRightButtonClick
|
||||
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
|
||||
Left = 358
|
||||
Top = 216
|
||||
@ -160,7 +136,7 @@ object frmCustomizeHighlighter: TfrmCustomizeHighlighter
|
||||
Height = 25
|
||||
Anchors = [akRight, akBottom]
|
||||
Caption = 'Apply'
|
||||
TabOrder = 9
|
||||
TabOrder = 8
|
||||
OnClick = SaveSettings
|
||||
end
|
||||
end
|
||||
|
@ -5,10 +5,10 @@ interface
|
||||
uses
|
||||
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,
|
||||
System.StrUtils, SynEditHighlighter, gnugettext, apphelpers;
|
||||
System.StrUtils, SynEditHighlighter, gnugettext, apphelpers, extra_controls;
|
||||
|
||||
type
|
||||
TfrmCustomizeHighlighter = class(TForm)
|
||||
TfrmCustomizeHighlighter = class(TExtForm)
|
||||
comboHighlighter: TComboBox;
|
||||
listboxAttributes: TListBox;
|
||||
lblBackground: TLabel;
|
||||
@ -20,9 +20,7 @@ type
|
||||
btnOK: TButton;
|
||||
editBackground: TButtonedEdit;
|
||||
editForeground: TButtonedEdit;
|
||||
pnlSample: TPanel;
|
||||
btnApply: TButton;
|
||||
lblSample: TLabel;
|
||||
procedure listboxAttributesClick(Sender: TObject);
|
||||
procedure FormCreate(Sender: TObject);
|
||||
procedure comboHighlighterSelect(Sender: TObject);
|
||||
@ -37,7 +35,6 @@ type
|
||||
FOnChange: TNotifyEvent;
|
||||
procedure SetFriendlyLanguageName(FriendlyLanguageName: String);
|
||||
function GetFriendlyLanguageName: String;
|
||||
procedure UpdateSampleBox;
|
||||
public
|
||||
{ Public-Deklarationen }
|
||||
property FriendlyLanguageName: String read GetFriendlyLanguageName write SetFriendlyLanguageName;
|
||||
@ -73,7 +70,6 @@ begin
|
||||
FAttr.Style := FAttr.Style + [fsItalic]
|
||||
else
|
||||
FAttr.Style := FAttr.Style - [fsItalic];
|
||||
UpdateSampleBox;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomizeHighlighter.comboHighlighterSelect(Sender: TObject);
|
||||
@ -159,7 +155,6 @@ begin
|
||||
editForeground.Enabled := AttrSelected;
|
||||
chkBold.Enabled := AttrSelected;
|
||||
chkItalic.Enabled := AttrSelected;
|
||||
pnlSample.Enabled := AttrSelected;
|
||||
// Overtake values
|
||||
if AttrSelected then begin
|
||||
editBackground.Text := IfThen(FAttr.Background <> clNone, ColorToWebColorStr(FAttr.Background), '');
|
||||
@ -173,7 +168,6 @@ begin
|
||||
chkBold.Checked := False;
|
||||
chkItalic.Checked := False;
|
||||
end;
|
||||
UpdateSampleBox;
|
||||
end;
|
||||
|
||||
procedure TfrmCustomizeHighlighter.SetFriendlyLanguageName(FriendlyLanguageName: String);
|
||||
@ -188,21 +182,5 @@ begin
|
||||
Result := FHighlighter.FriendlyLanguageName;
|
||||
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.
|
||||
|
Reference in New Issue
Block a user