Opkman: Disable custom drawing by default. It can be re-enabled in the Options dialog.

git-svn-id: trunk@55661 -
This commit is contained in:
balazs 2017-08-14 10:56:36 +00:00
parent 28a2b957bf
commit 1c16d6050b
22 changed files with 348 additions and 246 deletions

View File

@ -5,11 +5,11 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
Width = 750
ClientHeight = 506
ClientWidth = 750
Color = clBtnFace
Color = clDefault
ParentColor = False
TabOrder = 0
DesignLeft = 469
DesignTop = 213
DesignLeft = 468
DesignTop = 212
object pnMessage: TPanel
Left = 247
Height = 408
@ -54,9 +54,9 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
AnchorSideTop.Control = pnBrowse
AnchorSideTop.Side = asrCenter
Left = 6
Height = 17
Top = 20
Width = 88
Height = 15
Top = 21
Width = 68
Alignment = taRightJustify
BorderSpacing.Left = 6
Caption = 'lbPackagedir'
@ -76,10 +76,10 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = pnBrowse
AnchorSideRight.Side = asrBottom
Left = 100
Height = 27
Top = 15
Width = 644
Left = 80
Height = 23
Top = 17
Width = 664
OnAcceptDirectory = edPackageDirAcceptDirectory
ShowHidden = False
ButtonWidth = 50
@ -109,63 +109,63 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
Align = alClient
BevelOuter = bvNone
BorderStyle = bsSingle
ClientHeight = 217
ClientWidth = 501
ClientHeight = 215
ClientWidth = 499
TabOrder = 1
Visible = False
object edSupportedWidgetset: TEdit
Left = 170
Height = 27
Height = 23
Top = 80
Width = 302
Width = 300
Anchors = [akTop, akLeft, akRight]
TabOrder = 2
end
object lbLazCompatibility: TLabel
Left = 9
Height = 17
Height = 15
Top = 14
Width = 128
Width = 99
Caption = 'lbLazCompatibility'
ParentColor = False
end
object lbFPCCompatibility: TLabel
Left = 9
Height = 17
Height = 15
Top = 50
Width = 131
Width = 103
Caption = 'lbFPCCompatibility'
ParentColor = False
end
object edLazCompatibility: TEdit
Left = 170
Height = 27
Height = 23
Top = 8
Width = 302
Width = 300
Anchors = [akTop, akLeft, akRight]
TabOrder = 0
end
object edFPCCompatibility: TEdit
Left = 170
Height = 27
Height = 23
Top = 45
Width = 302
Width = 300
Anchors = [akTop, akLeft, akRight]
TabOrder = 1
end
object lbSupportedWidgetSet: TLabel
Left = 9
Height = 17
Height = 15
Top = 85
Width = 156
Width = 119
Caption = 'lbSupportedWidgetSet'
ParentColor = False
end
object lbOF1: TLabel
Left = 474
Height = 17
Height = 15
Top = 14
Width = 7
Width = 5
Anchors = [akTop, akRight]
Caption = '*'
Font.Color = clRed
@ -175,9 +175,9 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
end
object lbOF3: TLabel
Left = 474
Height = 17
Height = 15
Top = 50
Width = 7
Width = 5
Anchors = [akTop, akRight]
Caption = '*'
Font.Color = clRed
@ -187,9 +187,9 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
end
object lbOF4: TLabel
Left = 474
Height = 17
Height = 15
Top = 85
Width = 7
Width = 5
Anchors = [akTop, akRight]
Caption = '*'
Font.Color = clRed
@ -206,23 +206,23 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
Align = alTop
BevelOuter = bvNone
BorderStyle = bsSingle
ClientHeight = 187
ClientWidth = 501
ClientHeight = 185
ClientWidth = 499
TabOrder = 0
Visible = False
object lbCategory: TLabel
Left = 9
Height = 17
Height = 15
Top = 14
Width = 74
Width = 58
Caption = 'lbCategory'
ParentColor = False
end
object lbOF2: TLabel
Left = 474
Height = 17
Height = 15
Top = 14
Width = 7
Width = 5
Anchors = [akTop, akRight]
Caption = '*'
Font.Color = clRed
@ -232,85 +232,85 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
end
object lbHomePageURL: TLabel
Left = 9
Height = 17
Height = 15
Top = 87
Width = 113
Width = 90
Caption = 'lbHomePageURL'
ParentColor = False
end
object lbDownloadURL: TLabel
Left = 9
Height = 17
Height = 15
Top = 123
Width = 108
Width = 85
Caption = 'lbDownloadURL'
ParentColor = False
end
object edHomePageURL: TEdit
Left = 170
Height = 27
Height = 23
Top = 83
Width = 302
Width = 300
Anchors = [akTop, akLeft, akRight]
TabOrder = 2
end
object edDownloadURL: TEdit
Left = 170
Height = 27
Height = 23
Top = 118
Width = 302
Width = 300
Anchors = [akTop, akLeft, akRight]
TabOrder = 3
end
object lbSVNURL: TLabel
Left = 9
Height = 17
Height = 15
Top = 154
Width = 69
Width = 53
Caption = 'lbSVNURL'
ParentColor = False
Visible = False
end
object edSVNURL: TEdit
Left = 170
Height = 27
Height = 23
Top = 152
Width = 302
Width = 300
Anchors = [akTop, akLeft, akRight]
TabOrder = 4
Visible = False
end
object lbDisplayName: TLabel
Left = 9
Height = 17
Height = 15
Top = 53
Width = 102
Width = 80
Caption = 'lbDisplayName'
ParentColor = False
end
object edDisplayName: TEdit
Left = 170
Height = 27
Height = 23
Top = 48
Width = 302
Width = 300
Anchors = [akTop, akLeft, akRight]
TabOrder = 1
end
object pnCategories: TPanel
Left = 170
Height = 27
Height = 23
Top = 9
Width = 303
Width = 301
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BevelOuter = bvNone
ClientHeight = 27
ClientWidth = 303
ClientHeight = 23
ClientWidth = 301
ParentColor = False
TabOrder = 0
object spCategories: TSpeedButton
Left = 253
Height = 27
Left = 251
Height = 23
Top = 0
Width = 50
Align = alRight
@ -321,9 +321,9 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
end
object edCategories: TEdit
Left = 0
Height = 27
Height = 23
Top = 0
Width = 253
Width = 251
Align = alClient
AutoSize = False
ParentShowHint = False
@ -352,17 +352,17 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
Align = alBottom
BevelOuter = bvNone
BorderStyle = bsSingle
ClientHeight = 39
ClientWidth = 748
ClientHeight = 37
ClientWidth = 746
TabOrder = 5
object cbJSONForUpdates: TCheckBox
AnchorSideLeft.Control = pnButtons
AnchorSideTop.Control = pnButtons
AnchorSideTop.Side = asrCenter
Left = 6
Height = 24
Top = 7
Width = 193
Height = 19
Top = 9
Width = 148
BorderSpacing.Left = 6
Caption = 'Create JSON for updates'
TabOrder = 0
@ -372,21 +372,21 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
AnchorSideTop.Side = asrCenter
AnchorSideRight.Control = pnButtons
AnchorSideRight.Side = asrBottom
Left = 334
Height = 33
Top = 3
Left = 332
Height = 29
Top = 4
Width = 408
Anchors = [akTop, akRight]
AutoSize = True
BorderSpacing.Around = 6
BorderSpacing.InnerBorder = 1
BevelOuter = bvNone
ClientHeight = 33
ClientHeight = 29
ClientWidth = 408
TabOrder = 1
object bCancel: TButton
Left = 327
Height = 31
Height = 27
Top = 1
Width = 80
Align = alRight
@ -403,7 +403,7 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
end
object bCreate: TButton
Left = 165
Height = 31
Height = 27
Top = 1
Width = 80
Align = alRight
@ -420,7 +420,7 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
end
object bSubmit: TButton
Left = 246
Height = 31
Height = 27
Top = 1
Width = 80
Align = alRight
@ -436,7 +436,7 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
end
object bOptions: TButton
Left = 84
Height = 31
Height = 27
Top = 1
Width = 80
Align = alRight
@ -452,7 +452,7 @@ object CreateRepositoryPackagefr: TCreateRepositoryPackagefr
end
object bHelp: TButton
Left = 3
Height = 31
Height = 27
Top = 1
Width = 80
Align = alRight

View File

@ -171,6 +171,8 @@ begin
bSubmit.Visible := ATyp = 0;
cbJSONForUpdates.Visible := ATyp = 0;
bCreate.Visible := ATyp = 0;
if not Options.UseDefaultTheme then
Self.Color := clBtnFace;
FVSTPackages := TVirtualStringTree.Create(nil);
with FVSTPackages do
@ -179,7 +181,8 @@ begin
Align := alClient;
Anchors := [akLeft, akTop, akRight];
Images := imTree;
Color := clBtnFace;
if not Options.UseDefaultTheme then
Color := clBtnFace;
DefaultNodeHeight := 25;
Indent := 15;
TabOrder := 1;
@ -216,7 +219,8 @@ begin
Height := 200;
Anchors := [akLeft, akTop, akRight];
Images := imTree;
Color := clBtnFace;
if not Options.UseDefaultTheme then
Color := clBtnFace;
DefaultNodeHeight := 25;
Indent := 15;
TabOrder := 1;

View File

@ -7,7 +7,6 @@ object CategoriesFrm: TCategoriesFrm
Caption = 'CategoriesFrm'
ClientHeight = 383
ClientWidth = 345
Color = clBtnFace
KeyPreview = True
OnClose = FormClose
OnCreate = FormCreate
@ -15,7 +14,6 @@ object CategoriesFrm: TCategoriesFrm
OnKeyPress = FormKeyPress
PopupMode = pmExplicit
Position = poOwnerFormCenter
LCLVersion = '1.7'
object pnMessage: TPanel
Left = 0
Height = 47
@ -28,7 +26,7 @@ object CategoriesFrm: TCategoriesFrm
TabOrder = 0
object lbMessage: TLabel
Left = 11
Height = 17
Height = 15
Top = 11
Width = 323
Anchors = [akTop, akLeft, akRight]
@ -40,8 +38,8 @@ object CategoriesFrm: TCategoriesFrm
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 37
Top = 340
Height = 34
Top = 343
Width = 333
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True

View File

@ -32,7 +32,7 @@ uses
// LCL
Forms, Controls, Graphics, ExtCtrls, StdCtrls, ButtonPanel,
// OpkMan
opkman_const, opkman_common, opkman_VirtualTrees;
opkman_const, opkman_common, opkman_VirtualTrees, opkman_options;
type
@ -116,6 +116,8 @@ end;
procedure TCategoriesFrm.FormCreate(Sender: TObject);
begin
if not Options.UseDefaultTheme then
Self.Color := clBtnFace;
FVST := TVirtualStringTree.Create(nil);
with FVST do
begin
@ -123,7 +125,8 @@ begin
Align := alClient;
Anchors := [akLeft, akTop, akRight];
Images := imTree;
Color := clBtnFace;
if not Options.UseDefaultTheme then
Color := clBtnFace;
DefaultNodeHeight := 25;
Indent := 0;
TabOrder := 1;

View File

@ -285,6 +285,7 @@ resourcestring
rsOptions_LastUpdate_Never = 'never';
rsOptions_lbDaysToShowNewPackages_Caption = 'Show different icon for newly added packages for (days):';
rsOptions_cbRegular_Caption = 'Show regular icon for newly added packages after install';
rsOptions_cbUseDefaultTheme_Caption = 'Use default theme manager';
rsOptions_lbFilterFiles_Caption = 'Excluded files (packages)';
rsOptions_lbFilterDirs_Caption = 'Excluded folders (packages)';
rsOptions_bAdd_Caption = 'Add';

View File

@ -7,14 +7,12 @@ object CreateJSONForUpdatesFrm: TCreateJSONForUpdatesFrm
Caption = 'CreateJSONForUpdatesFrm'
ClientHeight = 304
ClientWidth = 580
Color = clBtnFace
Constraints.MinHeight = 200
Constraints.MinWidth = 300
OnCreate = FormCreate
OnDestroy = FormDestroy
PopupMode = pmExplicit
Position = poOwnerFormCenter
LCLVersion = '1.7'
object pnButtons: TPanel
Left = 0
Height = 41

View File

@ -33,7 +33,7 @@ uses
Forms, Controls, Graphics, Dialogs, ExtCtrls, StdCtrls, LCLIntf,
// OpkMan
opkman_serializablepackages, opkman_const, opkman_common, opkman_updates,
opkman_VirtualTrees;
opkman_VirtualTrees, opkman_options;
type
@ -95,6 +95,8 @@ type
procedure TCreateJSONForUpdatesFrm.FormCreate(Sender: TObject);
begin
if not Options.UseDefaultTheme then
Self.Color := clBtnFace;
Caption := rsCreateJSONForUpdatesFrm_Caption;
lbLinkToZip.Caption := rsCreateJSONForUpdatesFrm_lbLinkToZip_Caption;
bTest.Caption := rsCreateJSONForUpdatesFrm_bTest_Caption;
@ -109,7 +111,8 @@ begin
Align := alClient;
Anchors := [akLeft, akTop, akRight];
Images := imTree;
Color := clBtnFace;
if not Options.UseDefaultTheme then
Color := clBtnFace;
DefaultNodeHeight := 25;
Indent := 0;
TabOrder := 1;

View File

@ -7,14 +7,12 @@ object CreateRepositoryPackagesFrm: TCreateRepositoryPackagesFrm
Caption = 'CreateRepositoryPackagesFrm'
ClientHeight = 454
ClientWidth = 753
Color = clBtnFace
Constraints.MinHeight = 450
Constraints.MinWidth = 650
OnClose = FormClose
OnCreate = FormCreate
PopupMode = pmExplicit
Position = poOwnerFormCenter
LCLVersion = '1.7'
inline frCreateRep: TCreateRepositoryPackagefr
Height = 454
Width = 753
@ -69,6 +67,7 @@ object CreateRepositoryPackagesFrm: TCreateRepositoryPackagesFrm
end
inherited pnCategory: TPanel
Width = 506
ClientHeight = 185
ClientWidth = 502
inherited lbOF2: TLabel
Left = 477
@ -103,6 +102,7 @@ object CreateRepositoryPackagesFrm: TCreateRepositoryPackagesFrm
inherited pnButtons: TPanel
Top = 413
Width = 753
ClientHeight = 37
ClientWidth = 749
inherited pnB: TPanel
Left = 335

View File

@ -6,7 +6,6 @@ object MainFrm: TMainFrm
Caption = 'Online Package Manager'
ClientHeight = 600
ClientWidth = 800
Color = clBtnFace
Constraints.MinHeight = 400
Constraints.MinWidth = 700
KeyPreview = True
@ -15,7 +14,6 @@ object MainFrm: TMainFrm
OnKeyPress = FormKeyPress
OnShow = FormShow
Position = poScreenCenter
LCLVersion = '1.9.0.0'
object pnMain: TPanel
Left = 0
Height = 530
@ -25,6 +23,7 @@ object MainFrm: TMainFrm
BevelOuter = bvNone
ClientHeight = 530
ClientWidth = 800
ParentColor = False
TabOrder = 0
OnResize = pnMainResize
object pnMessage: TPanel
@ -41,6 +40,7 @@ object MainFrm: TMainFrm
Font.Pitch = fpVariable
Font.Quality = fqDraft
Font.Style = [fsBold]
ParentColor = False
ParentFont = False
TabOrder = 2
Visible = False
@ -54,7 +54,6 @@ object MainFrm: TMainFrm
BevelOuter = bvNone
ClientHeight = 60
ClientWidth = 800
Color = clBtnFace
ParentColor = False
TabOrder = 0
OnResize = pnTopResize
@ -208,7 +207,7 @@ object MainFrm: TMainFrm
ClientHeight = 28
ClientWidth = 200
ParentColor = False
TabOrder = 2
TabOrder = 1
object spClear: TSpeedButton
Left = 170
Height = 28
@ -268,35 +267,6 @@ object MainFrm: TMainFrm
TabOrder = 0
end
end
object cbFilterBy: TComboBox
Left = 203
Height = 23
Top = 10
Width = 141
ItemHeight = 15
ItemIndex = 0
Items.Strings = (
'Packagename '
'Package file(.lpk)'
'Package category'
'Package status'
'Version'
'Description '
'Author '
'Lazarus compatibility'
'FPC compatibility'
'Supported widget sets'
'Packagetype '
'Dependencies'
'License'
)
OnChange = cbFilterByChange
ParentShowHint = False
ShowHint = True
Style = csDropDownList
TabOrder = 1
Text = 'Packagename '
end
object lbFilterBy: TLabel
Left = 152
Height = 15
@ -325,7 +295,7 @@ object MainFrm: TMainFrm
)
OnChange = cbPackageCategoryChange
Style = csDropDownList
TabOrder = 3
TabOrder = 2
end
object cbPackageState: TComboBox
Left = 352
@ -343,7 +313,7 @@ object MainFrm: TMainFrm
)
OnChange = cbPackageStateChange
Style = csDropDownList
TabOrder = 4
TabOrder = 3
end
object cbPackageType: TComboBox
Left = 352
@ -362,9 +332,38 @@ object MainFrm: TMainFrm
)
OnChange = cbPackageTypeChange
Style = csDropDownList
TabOrder = 5
TabOrder = 4
Text = 'Designtime and runtime'
end
object cbFilterBy: TComboBox
Left = 203
Height = 23
Top = 10
Width = 141
ItemHeight = 15
ItemIndex = 0
Items.Strings = (
'Packagename '
'Package file(.lpk)'
'Package category'
'Package status'
'Version'
'Description '
'Author '
'Lazarus compatibility'
'FPC compatibility'
'Supported widget sets'
'Packagetype '
'Dependencies'
'License'
)
OnChange = cbFilterByChange
ParentShowHint = False
ShowHint = True
Style = csDropDownList
TabOrder = 5
Text = 'Packagename '
end
end
object mJSON: TMemo
Left = 0
@ -372,7 +371,6 @@ object MainFrm: TMainFrm
Top = 60
Width = 800
Align = alClient
Color = clBtnFace
PopupMenu = pmMemo
ReadOnly = True
ScrollBars = ssBoth

View File

@ -29,7 +29,7 @@ unit opkman_mainfrm;
interface
uses
Classes, SysUtils, contnrs, fpjson, md5,
Classes, SysUtils, contnrs, fpjson, md5, Graphics,
// LCL
Forms, Controls, Dialogs, StdCtrls, ExtCtrls, Buttons, Menus, ComCtrls, Clipbrd,
LCLIntf, LCLVersion, LCLProc,
@ -49,6 +49,7 @@ type
{ TMainFrm }
TMainFrm = class(TForm)
cbFilterBy: TComboBox;
cbPackageCategory: TComboBox;
cbPackageState: TComboBox;
cbPackageType: TComboBox;
@ -76,7 +77,6 @@ type
tbUninstall: TToolButton;
tbOptions: TToolButton;
cbAll: TCheckBox;
cbFilterBy: TComboBox;
edFilter: TEdit;
imTree: TImageList;
lbFilterBy: TLabel;
@ -141,6 +141,7 @@ type
procedure EnableDisableControls(const AEnable: Boolean);
procedure SetupMessage(const AMessage: String = '');
procedure SetupControls;
procedure SetupColors;
procedure GetPackageList(const ARepositoryHasChanged: Boolean = False);
procedure DoOnChecking(Sender: TObject; const AIsAllChecked: Boolean);
procedure DoOnChecked(Sender: TObject);
@ -230,6 +231,7 @@ end;
procedure TMainFrm.FormShow(Sender: TObject);
begin
SetupControls;
SetupColors;
GetPackageList;
end;
@ -416,15 +418,19 @@ end;
procedure TMainFrm.ShowOptions(const AActivePageIndex: Integer = 0);
var
OldIndex: Integer;
DefaultTheme: Boolean;
begin
OptionsFrm := TOptionsFrm.Create(MainFrm);
try
OptionsFrm.SetupControls(AActivePageIndex);
OldIndex := Options.ActiveRepositoryIndex;
DefaultTheme := Options.UseDefaultTheme;
if OptionsFrm.ShowModal = mrOk then
begin
tbRefresh.Enabled := Trim(Options.RemoteRepository[Options.ActiveRepositoryIndex]) <> '';
GetPackageList(OldIndex <> Options.ActiveRepositoryIndex);
if DefaultTheme <> Options.UseDefaultTheme then
SetupColors;
end;
finally
OptionsFrm.Free;
@ -1130,7 +1136,7 @@ procedure TMainFrm.miJSONShowClick(Sender: TObject);
begin
if not mJSON.Visible then
begin
StopUpdates;
//StopUpdates;
EnableDisableControls(False);
mJSON.Visible := True;
mJSON.BringToFront;
@ -1140,7 +1146,7 @@ begin
mJSON.SendToBack;
mJSON.Visible := False;
EnableDisableControls(True);
StartUpdates;
//StartUpdates;
end;
end;
@ -1288,6 +1294,24 @@ begin
cbPackageState.Visible := False;
end;
procedure TMainFrm.SetupColors;
begin
VisualTree.SetupColors;
if not Options.UseDefaultTheme then
begin
Self.Color := clBtnFace;
pnMain.Color := clBtnFace;
pnMessage.Color := clBtnFace;
pnTop.Color := clBtnFace;
mJSON.Color := clBtnFace;
end
else
begin
pnMain.Color := VisualTree.VST.Color;
pnMessage.Color := VisualTree.VST.Color;
end;
end;
end.

View File

@ -62,6 +62,7 @@ type
FLastUpdate: TDateTime;
FDaysToShowNewPackages: Integer;
FShowRegularIcons: Boolean;
FUseDefaultTheme: Boolean;
FChanged: Boolean;
FLastDownloadDir: String;
FLastPackageDirSrc: String;
@ -95,6 +96,7 @@ type
property LastUpdate: TDateTime read FLastUpdate write FLastUpdate;
property DaysToShowNewPackages: Integer read FDaysToShowNewPackages write FDaysToShowNewPackages;
property ShowRegularIcons: Boolean read FShowRegularIcons write FShowRegularIcons;
property UseDefaultTheme: Boolean read FUseDefaultTheme write FUseDefaultTheme;
property UserProfile: Integer read FUserProfile write FUserProfile;
property LastDownloadDir: String read FLastDownloadDir write FLastDownloadDir;
property LastPackagedirSrc: String read FLastPackageDirSrc write FLastPackageDirSrc;
@ -178,6 +180,7 @@ begin
FLastUpdate := FXML.GetExtendedValue('General/LastUpdate/Value', 0.0);
FDaysToShowNewPackages := FXML.GetValue('General/DaysToShowNewPackages/Value', 31);
FShowRegularIcons := FXML.GetValue('General/ShowRegularIcons/Value', True);
FUseDefaultTheme := FXML.GetValue('General/UseDefaultTheme/Value', True);
FProxySettings.FEnabled := FXML.GetValue('Proxy/Enabled/Value', False);
FProxySettings.FServer := FXML.GetValue('Proxy/Server/Value', '');
@ -208,6 +211,8 @@ begin
FXML.SetDeleteExtendedValue('General/LastUpdate/Value', FLastUpdate, 0.0);
FXML.SetDeleteValue('General/DaysToShowNewPackages/Value', FDaysToShowNewPackages, 31);
FXML.SetDeleteValue('General/ShowRegularIcons/Value', FShowRegularIcons, True);
FXML.SetDeleteValue('General/UseDefaultTheme/Value', FUseDefaultTheme, True);
FXML.SetDeleteValue('Proxy/Enabled/Value', FProxySettings.FEnabled, false);
FXML.SetDeleteValue('Proxy/Server/Value', FProxySettings.FServer, '');
@ -239,6 +244,7 @@ begin
FLastUpdate := 0.0;
FDaysToShowNewPackages := 31;
FShowRegularIcons := True;
FUseDefaultTheme := True;
FProxySettings.FEnabled := False;
FProxySettings.FServer := '';

View File

@ -1,36 +1,34 @@
object OptionsFrm: TOptionsFrm
Left = 719
Height = 408
Height = 442
Top = 228
Width = 525
Width = 530
BorderIcons = [biSystemMenu]
Caption = 'Options'
ClientHeight = 408
ClientWidth = 525
Color = clBtnFace
ClientHeight = 442
ClientWidth = 530
Constraints.MinHeight = 300
Constraints.MinWidth = 475
KeyPreview = True
OnKeyPress = FormKeyPress
PopupMode = pmExplicit
Position = poOwnerFormCenter
LCLVersion = '1.7'
object pnBottom: TPanel
Left = 0
Height = 31
Top = 377
Width = 525
Top = 411
Width = 530
Align = alBottom
AutoSize = True
BevelOuter = bvNone
ClientHeight = 31
ClientWidth = 525
ClientWidth = 530
TabOrder = 1
object bOk: TButton
AnchorSideRight.Control = bCancel
AnchorSideBottom.Control = bRestore
AnchorSideBottom.Side = asrBottom
Left = 353
Left = 358
Height = 25
Top = 0
Width = 80
@ -47,7 +45,7 @@ object OptionsFrm: TOptionsFrm
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = bRestore
AnchorSideBottom.Side = asrBottom
Left = 439
Left = 444
Height = 25
Top = 0
Width = 80
@ -78,9 +76,9 @@ object OptionsFrm: TOptionsFrm
end
object pgOptions: TPageControl
Left = 6
Height = 365
Height = 399
Top = 6
Width = 513
Width = 518
ActivePage = tsGeneral
Align = alClient
BorderSpacing.Around = 6
@ -88,26 +86,25 @@ object OptionsFrm: TOptionsFrm
TabOrder = 0
object tsGeneral: TTabSheet
Caption = 'General'
ClientHeight = 337
ClientWidth = 505
ClientHeight = 371
ClientWidth = 510
object pnGeneral: TPanel
Left = 0
Height = 336
Height = 370
Top = 0
Width = 505
Width = 510
Align = alClient
BorderSpacing.Bottom = 1
BevelOuter = bvNone
ClientHeight = 336
ClientWidth = 505
Color = clBtnFace
ClientHeight = 370
ClientWidth = 510
ParentColor = False
TabOrder = 0
object lbRemoteRepository: TLabel
AnchorSideLeft.Control = pnGeneral
Left = 6
Height = 15
Top = 16
Top = 8
Width = 100
BorderSpacing.Left = 6
Caption = 'Remote repository:'
@ -119,7 +116,7 @@ object OptionsFrm: TOptionsFrm
AnchorSideTop.Side = asrBottom
Left = 6
Height = 19
Top = 64
Top = 56
Width = 235
BorderSpacing.Top = 6
Caption = ' Force download and extract of packages'
@ -133,7 +130,7 @@ object OptionsFrm: TOptionsFrm
AnchorSideTop.Side = asrBottom
Left = 6
Height = 19
Top = 85
Top = 77
Width = 294
BorderSpacing.Top = 2
Caption = 'Delete downloaded zip files after installation/update'
@ -145,7 +142,7 @@ object OptionsFrm: TOptionsFrm
AnchorSideLeft.Control = lbRemoteRepository
Left = 6
Height = 15
Top = 144
Top = 141
Width = 146
Caption = 'Check for package updates:'
ParentColor = False
@ -156,7 +153,7 @@ object OptionsFrm: TOptionsFrm
AnchorSideTop.Side = asrBottom
Left = 6
Height = 23
Top = 165
Top = 162
Width = 209
BorderSpacing.Top = 6
ItemHeight = 15
@ -180,7 +177,7 @@ object OptionsFrm: TOptionsFrm
AnchorSideTop.Side = asrCenter
Left = 230
Height = 15
Top = 169
Top = 166
Width = 64
BorderSpacing.Left = 15
Caption = 'Last update:'
@ -194,15 +191,15 @@ object OptionsFrm: TOptionsFrm
AnchorSideRight.Side = asrBottom
Left = 6
Height = 23
Top = 35
Width = 493
Top = 27
Width = 498
Anchors = [akTop, akLeft, akRight]
AutoSize = True
BorderSpacing.Top = 4
BorderSpacing.Right = 6
BevelOuter = bvNone
ClientHeight = 23
ClientWidth = 493
ClientWidth = 498
TabOrder = 0
object cbRemoteRepository: TComboBox
AnchorSideLeft.Control = pnRepositories
@ -211,7 +208,7 @@ object OptionsFrm: TOptionsFrm
Left = 0
Height = 23
Top = 0
Width = 430
Width = 435
Anchors = [akTop, akLeft, akRight]
BorderSpacing.Right = 2
ItemHeight = 15
@ -226,7 +223,7 @@ object OptionsFrm: TOptionsFrm
AnchorSideRight.Side = asrBottom
AnchorSideBottom.Control = cbRemoteRepository
AnchorSideBottom.Side = asrBottom
Left = 432
Left = 437
Height = 22
Top = 0
Width = 61
@ -241,7 +238,7 @@ object OptionsFrm: TOptionsFrm
AnchorSideLeft.Control = lbRemoteRepository
Left = 6
Height = 15
Top = 216
Top = 213
Width = 204
Caption = 'Show newly added packages for(days):'
ParentColor = False
@ -253,7 +250,7 @@ object OptionsFrm: TOptionsFrm
AnchorSideTop.Side = asrCenter
Left = 216
Height = 23
Top = 212
Top = 209
Width = 76
BorderSpacing.Left = 6
MaxValue = 365
@ -263,34 +260,55 @@ object OptionsFrm: TOptionsFrm
object cbRegularIcons: TCheckBox
Left = 6
Height = 19
Top = 240
Top = 237
Width = 232
Caption = 'Show regular icon for installed packages'
TabOrder = 5
end
object cbUseDefaultTheme: TCheckBox
Left = 6
Height = 19
Top = 301
Width = 116
Caption = 'Use default theme'
TabOrder = 6
end
object Bevel1: TBevel
Left = 0
Height = 2
Top = 134
Width = 506
Anchors = [akTop, akLeft, akRight]
end
object Bevel2: TBevel
Left = 4
Height = 2
Top = 288
Width = 506
Anchors = [akTop, akLeft, akRight]
end
end
end
object tsProxy: TTabSheet
Caption = 'Proxy'
ClientHeight = 330
ClientWidth = 509
ClientHeight = 337
ClientWidth = 505
object pnProxy: TPanel
Left = 0
Height = 342
Height = 337
Top = 0
Width = 521
Width = 505
Align = alClient
BevelOuter = bvNone
ClientHeight = 342
ClientWidth = 521
Color = clBtnFace
ClientHeight = 337
ClientWidth = 505
ParentColor = False
TabOrder = 0
object cbProxy: TCheckBox
Left = 8
Height = 24
Height = 19
Top = 15
Width = 93
Width = 71
Caption = 'Use Proxy'
OnChange = cbProxyChange
TabOrder = 0
@ -301,7 +319,7 @@ object OptionsFrm: TOptionsFrm
AnchorSideTop.Side = asrBottom
Left = 8
Height = 144
Top = 45
Top = 40
Width = 411
BorderSpacing.Top = 6
Caption = 'Proxy Settings'
@ -313,8 +331,8 @@ object OptionsFrm: TOptionsFrm
AnchorSideTop.Control = lbServer
AnchorSideTop.Side = asrBottom
Left = 8
Height = 27
Top = 24
Height = 23
Top = 22
Width = 304
BorderSpacing.Top = 4
OnKeyPress = edRemoteRepositoryKeyPress
@ -323,9 +341,9 @@ object OptionsFrm: TOptionsFrm
end
object lbServer: TLabel
Left = 8
Height = 17
Height = 15
Top = 3
Width = 43
Width = 32
Caption = 'Server'
ParentColor = False
end
@ -334,9 +352,9 @@ object OptionsFrm: TOptionsFrm
AnchorSideTop.Control = edProxyServer
AnchorSideTop.Side = asrBottom
Left = 8
Height = 17
Top = 57
Width = 68
Height = 15
Top = 51
Width = 53
BorderSpacing.Top = 6
Caption = 'Username'
ParentColor = False
@ -346,8 +364,8 @@ object OptionsFrm: TOptionsFrm
AnchorSideTop.Control = lbUserName
AnchorSideTop.Side = asrBottom
Left = 8
Height = 27
Top = 78
Height = 23
Top = 70
Width = 186
BorderSpacing.Top = 4
OnKeyPress = edRemoteRepositoryKeyPress
@ -358,9 +376,9 @@ object OptionsFrm: TOptionsFrm
AnchorSideLeft.Control = seProxyPort
AnchorSideTop.Control = lbServer
Left = 318
Height = 17
Height = 15
Top = 3
Width = 30
Width = 22
Caption = 'Port'
ParentColor = False
end
@ -369,9 +387,9 @@ object OptionsFrm: TOptionsFrm
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = lbUserName
Left = 200
Height = 17
Top = 57
Width = 66
Height = 15
Top = 51
Width = 50
BorderSpacing.Left = 6
Caption = 'Password'
ParentColor = False
@ -382,8 +400,8 @@ object OptionsFrm: TOptionsFrm
AnchorSideRight.Control = seProxyPort
AnchorSideRight.Side = asrBottom
Left = 200
Height = 27
Top = 78
Height = 23
Top = 70
Width = 193
Anchors = [akTop, akLeft, akRight]
EchoMode = emPassword
@ -397,8 +415,8 @@ object OptionsFrm: TOptionsFrm
AnchorSideLeft.Side = asrBottom
AnchorSideTop.Control = edProxyServer
Left = 318
Height = 27
Top = 24
Height = 23
Top = 22
Width = 75
BorderSpacing.Left = 6
MaxValue = 65635
@ -409,25 +427,24 @@ object OptionsFrm: TOptionsFrm
end
object tsFolders: TTabSheet
Caption = 'Folders'
ClientHeight = 330
ClientWidth = 509
ClientHeight = 337
ClientWidth = 505
object pnFolders: TPanel
Left = 0
Height = 298
Height = 337
Top = 0
Width = 521
Width = 505
Align = alClient
BevelOuter = bvNone
ClientHeight = 298
ClientWidth = 521
Color = clBtnFace
ClientHeight = 337
ClientWidth = 505
ParentColor = False
TabOrder = 0
object lbLocalRepositoryPackages: TLabel
Left = 8
Height = 17
Height = 15
Top = 16
Width = 110
Width = 84
Caption = 'Local repository'
ParentColor = False
ParentShowHint = False
@ -437,9 +454,9 @@ object OptionsFrm: TOptionsFrm
AnchorSideTop.Control = edLocalRepositoryPackages
AnchorSideTop.Side = asrBottom
Left = 8
Height = 17
Top = 76
Width = 161
Height = 15
Top = 70
Width = 125
BorderSpacing.Top = 12
Caption = 'Local repository archive'
ParentColor = False
@ -450,9 +467,9 @@ object OptionsFrm: TOptionsFrm
AnchorSideTop.Control = edLocalRepositoryArchive
AnchorSideTop.Side = asrBottom
Left = 8
Height = 17
Top = 136
Width = 161
Height = 15
Top = 124
Width = 124
BorderSpacing.Top = 12
Caption = 'Local repository update'
ParentColor = False
@ -465,9 +482,9 @@ object OptionsFrm: TOptionsFrm
AnchorSideRight.Control = pnFolders
AnchorSideRight.Side = asrBottom
Left = 8
Height = 27
Top = 37
Width = 507
Height = 23
Top = 35
Width = 491
Directory = 'edLocalRepositoryPackages'
ShowHidden = False
ButtonWidth = 50
@ -489,9 +506,9 @@ object OptionsFrm: TOptionsFrm
AnchorSideRight.Control = edLocalRepositoryPackages
AnchorSideRight.Side = asrBottom
Left = 8
Height = 27
Top = 97
Width = 507
Height = 23
Top = 89
Width = 491
ShowHidden = False
ButtonWidth = 50
NumGlyphs = 1
@ -510,9 +527,9 @@ object OptionsFrm: TOptionsFrm
AnchorSideRight.Control = edLocalRepositoryArchive
AnchorSideRight.Side = asrBottom
Left = 8
Height = 27
Top = 157
Width = 507
Height = 23
Top = 143
Width = 491
ShowHidden = False
ButtonWidth = 50
NumGlyphs = 1
@ -538,7 +555,6 @@ object OptionsFrm: TOptionsFrm
BevelOuter = bvNone
ClientHeight = 337
ClientWidth = 505
Color = clBtnFace
ParentColor = False
TabOrder = 0
object pnProfilesTop: TPanel
@ -622,9 +638,7 @@ object OptionsFrm: TOptionsFrm
BorderSpacing.Top = 4
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
Color = clBtnFace
ItemHeight = 0
Options = [lboDrawFocusRect]
ParentShowHint = False
ScrollWidth = 151
ShowHint = True
@ -719,9 +733,7 @@ object OptionsFrm: TOptionsFrm
BorderSpacing.Top = 4
BorderSpacing.Right = 6
BorderSpacing.Bottom = 6
Color = clBtnFace
ItemHeight = 0
Options = [lboDrawFocusRect]
ParentShowHint = False
ScrollWidth = 164
ShowHint = True

View File

@ -30,7 +30,7 @@ unit opkman_optionsfrm;
interface
uses
SysUtils, Math,
SysUtils, Math, Graphics,
// LCL
Forms, Controls, Dialogs, StdCtrls, ExtCtrls, Spin, ComCtrls, EditBtn,
// LazUtils
@ -44,6 +44,8 @@ type
TOptionsFrm = class(TForm)
bCancel: TButton;
Bevel1: TBevel;
Bevel2: TBevel;
bFilesAdd: TButton;
bFilesDelete: TButton;
bFilesEdit: TButton;
@ -57,6 +59,7 @@ type
cbForceDownloadExtract: TCheckBox;
cbDeleteZipAfterInstall: TCheckBox;
cbCheckForUpdates: TComboBox;
cbUseDefaultTheme: TCheckBox;
cbRemoteRepository: TComboBox;
cbSelectProfile: TComboBox;
cbRegularIcons: TCheckBox;
@ -115,6 +118,7 @@ type
procedure pnProfilesTopResize(Sender: TObject);
private
function GetSelectedText(AListBox: TListBox; var AIndex: Integer): String;
procedure SetupColors;
public
procedure SetupControls(const AActivePageIndex: Integer = 0);
end;
@ -181,6 +185,7 @@ begin
Options.CheckForUpdates := cbCheckForUpdates.ItemIndex;
Options.DaysToShowNewPackages := spDaysToShowNewPackages.Value;
Options.ShowRegularIcons := cbRegularIcons.Checked;
Options.UseDefaultTheme := cbUseDefaultTheme.Checked;
Options.ProxyEnabled := cbProxy.Checked;
Options.ProxyServer := edProxyServer.Text;
@ -252,6 +257,24 @@ begin
end;
end;
procedure TOptionsFrm.SetupColors;
begin
if not Options.UseDefaultTheme then
begin
Self.Color := clBtnFace;
tsGeneral.Color := clBtnFace;
tsProxy.Color := clBtnFace;
tsFolders.Color := clBtnFace;
tsProfiles.Color := clBtnFace;
pnGeneral.Color := clBtnFace;
pnProxy.Color := clBtnFace;
pnFolders.Color := clBtnFace;
pnProfiles.Color := clBtnFace;
lbExcludeFiles.Color := clBtnFace;
lbExcludeFolders.Color := clBtnFace;
end;
end;
procedure TOptionsFrm.bFilesAddClick(Sender: TObject);
var
Value: String;
@ -415,6 +438,8 @@ begin
spDaysToShowNewPackages.Value := Options.DaysToShowNewPackages;
cbRegularIcons.Checked := Options.ShowRegularIcons;
cbRegularIcons.Caption := rsOptions_cbRegular_Caption;
cbUseDefaultTheme.Checked := Options.UseDefaultTheme;
cbUseDefaultTheme.Caption := rsOptions_cbUseDefaultTheme_Caption;
//spDaysToShowNewPackages.Top := lbDaysToShowNewPackages.Top + 1 + (lbDaysToShowNewPackages.Height - spDaysToShowNewPackages.Height) div 2;
//spDaysToShowNewPackages.Left := lbDaysToShowNewPackages.Left + lbDaysToShowNewPackages.Canvas.GetTextWidth(lbDaysToShowNewPackages.Caption) + 10;
@ -472,6 +497,7 @@ begin
lbExcludeFolders.Items.StrictDelimiter := True;
lbExcludeFolders.Items.DelimitedText := Options.ExcludedFolders;
pnProfilesMain.Visible := Options.UserProfile = 1;
SetupColors;
end;
procedure TOptionsFrm.pnProfilesMainResize(Sender: TObject);

View File

@ -6,12 +6,12 @@ object PackageDetailsFrm: TPackageDetailsFrm
BorderIcons = [biSystemMenu]
ClientHeight = 310
ClientWidth = 477
Color = clBtnFace
KeyPreview = True
OnCreate = FormCreate
OnKeyPress = FormKeyPress
PopupMode = pmExplicit
Position = poOwnerFormCenter
LCLVersion = '1.7'
LCLVersion = '1.9.0.0'
object mDetails: TMemo
Left = 5
Height = 259

View File

@ -29,7 +29,7 @@ interface
uses
// LCL
Forms, StdCtrls, ExtCtrls, ButtonPanel;
Forms, StdCtrls, ExtCtrls, ButtonPanel, Classes, Graphics;
type
@ -38,6 +38,7 @@ type
TPackageDetailsFrm = class(TForm)
ButtonPanel: TButtonPanel;
mDetails: TMemo;
procedure FormCreate(Sender: TObject);
procedure FormKeyPress(Sender: TObject; var Key: char);
private
@ -50,6 +51,8 @@ var
implementation
uses opkman_options;
{$R *.lfm}
{ TPackageDetailsFrm }
@ -60,5 +63,14 @@ begin
Close;
end;
procedure TPackageDetailsFrm.FormCreate(Sender: TObject);
begin
if not Options.UseDefaultTheme then
begin
Self.Color := clBtnFace;
mDetails.Color := clBtnFace;
end;
end;
end.

View File

@ -8,7 +8,6 @@ object PackageListFrm: TPackageListFrm
Caption = 'PackageListFrm'
ClientHeight = 265
ClientWidth = 394
Color = clBtnFace
KeyPreview = True
OnClose = FormClose
OnCreate = FormCreate
@ -16,7 +15,6 @@ object PackageListFrm: TPackageListFrm
OnKeyPress = FormKeyPress
PopupMode = pmExplicit
Position = poOwnerFormCenter
LCLVersion = '1.7'
object pnMessage: TPanel
Left = 0
Height = 47

View File

@ -30,7 +30,7 @@ uses
// LCL
Forms, Controls, Graphics, ExtCtrls, StdCtrls,
// OpkMan
opkman_VirtualTrees, opkman_const, opkman_serializablepackages;
opkman_VirtualTrees, opkman_const, opkman_serializablepackages, opkman_options;
type
@ -206,6 +206,8 @@ end;
procedure TPackageListFrm.FormCreate(Sender: TObject);
begin
if not Options.UseDefaultTheme then
Self.Color := clBtnFace;
FVST := TVirtualStringTree.Create(nil);
with FVST do
begin
@ -213,7 +215,8 @@ begin
Align := alClient;
Anchors := [akLeft, akTop, akRight];
Images := imTree;
Color := clBtnFace;
if not Options.UseDefaultTheme then
Color := clBtnFace;
DefaultNodeHeight := 25;
Indent := 0;
TabOrder := 1;

View File

@ -7,7 +7,6 @@ object ProgressFrm: TProgressFrm
Caption = 'Downloading packages'
ClientHeight = 320
ClientWidth = 502
Color = clBtnFace
Constraints.MinHeight = 240
Constraints.MinWidth = 450
KeyPreview = True
@ -18,7 +17,6 @@ object ProgressFrm: TProgressFrm
OnShow = FormShow
PopupMode = pmExplicit
Position = poOwnerFormCenter
LCLVersion = '1.7'
object pnLabels: TPanel
Left = 0
Height = 249

View File

@ -27,12 +27,12 @@ unit opkman_progressfrm;
interface
uses
SysUtils,
SysUtils, Classes,
// LCL
Forms, Controls, Graphics, Dialogs, ComCtrls, StdCtrls, ExtCtrls, ButtonPanel,
// OpkMan
opkman_installer, opkman_common, opkman_const, opkman_downloader, opkman_zipper,
opkman_VirtualTrees, Classes;
opkman_VirtualTrees, opkman_options;
type
@ -145,6 +145,8 @@ end;
procedure TProgressFrm.FormCreate(Sender: TObject);
begin
if not Options.UseDefaultTheme then
Self.Color := clBtnFace;
FVST := TVirtualStringTree.Create(nil);
with FVST do
begin
@ -152,7 +154,8 @@ begin
Align := alClient;
Anchors := [akLeft, akTop, akRight];
Images := imTree;
Color := clBtnFace;
if not Options.UseDefaultTheme then
Color := clBtnFace;
DefaultNodeHeight := 25;
Indent := 0;
TabOrder := 1;

View File

@ -7,20 +7,18 @@ object RepositoriesFrm: TRepositoriesFrm
Caption = 'RepositoriesFrm'
ClientHeight = 367
ClientWidth = 561
Color = clBtnFace
OnCreate = FormCreate
OnDestroy = FormDestroy
PopupMode = pmExplicit
Position = poOwnerFormCenter
LCLVersion = '1.7'
object pnBottom: TPanel
Left = 460
Height = 318
Height = 321
Top = 0
Width = 101
Align = alRight
BevelOuter = bvNone
ClientHeight = 318
ClientHeight = 321
ClientWidth = 101
TabOrder = 0
object bAdd: TButton
@ -28,7 +26,7 @@ object RepositoriesFrm: TRepositoriesFrm
AnchorSideRight.Control = pnBottom
AnchorSideRight.Side = asrBottom
Left = 15
Height = 29
Height = 25
Top = 6
Width = 80
Anchors = [akTop, akRight]
@ -47,8 +45,8 @@ object RepositoriesFrm: TRepositoriesFrm
AnchorSideRight.Control = bAdd
AnchorSideRight.Side = asrBottom
Left = 15
Height = 29
Top = 41
Height = 25
Top = 37
Width = 80
Anchors = [akTop, akRight]
AutoSize = True
@ -65,8 +63,8 @@ object RepositoriesFrm: TRepositoriesFrm
AnchorSideRight.Control = bAdd
AnchorSideRight.Side = asrBottom
Left = 15
Height = 29
Top = 76
Height = 25
Top = 68
Width = 80
Anchors = [akTop, akRight]
AutoSize = True
@ -79,8 +77,8 @@ object RepositoriesFrm: TRepositoriesFrm
end
object ButtonPanel1: TButtonPanel
Left = 6
Height = 37
Top = 324
Height = 34
Top = 327
Width = 549
OKButton.Name = 'OKButton'
OKButton.DefaultCaption = True

View File

@ -90,6 +90,8 @@ type
procedure TRepositoriesFrm.FormCreate(Sender: TObject);
begin
if not Options.UseDefaultTheme then
Self.Color := clBtnFace;
Caption := rsRepositories_Caption;
bAdd.Caption := rsRepositories_bAdd_Caption;
bEdit.Caption := rsRepositories_bEdit_Caption;

View File

@ -155,6 +155,7 @@ type
procedure UpdatePackageUStatus;
function ResolveDependencies: TModalResult;
function GetCheckedRepositoryPackages: Integer;
procedure SetupColors;
published
property OnChecking: TOnChecking read FOnChecking write FOnChecking;
property OnChecked: TNotifyEvent read FOnChecked write FOnChecked;
@ -179,7 +180,6 @@ begin
Anchors := [akLeft, akTop, akRight];
Images := AImgList;
PopupMenu := APopupMenu;
Color := clBtnFace;
DefaultNodeHeight := MulDiv(25, Screen.PixelsPerInch, 96);
Indent := 22;
TabOrder := 1;
@ -1186,6 +1186,8 @@ procedure TVisualTree.VSTBeforeCellPaint(Sender: TBaseVirtualTree;
var
Data: PData;
begin
if Options.UseDefaultTheme then
Exit;
if CellPaintMode = cpmPaint then
begin
Data := Sender.GetNodeData(Node);
@ -1318,6 +1320,19 @@ begin
end;
end;
procedure TVisualTree.SetupColors;
begin
if not Options.UseDefaultTheme then
begin
FVST.Color := clBtnFace;
FVST.TreeOptions.PaintOptions := FVST.TreeOptions.PaintOptions + [toAlwaysHideSelection];
end else
begin
FVST.Color := clDefault;
FVST.TreeOptions.PaintOptions := FVST.TreeOptions.PaintOptions - [toAlwaysHideSelection];
end;
end;
procedure TVisualTree.VSTCompareNodes(Sender: TBaseVirtualTree; Node1,
Node2: PVirtualNode; Column: TColumnIndex; var Result: Integer);
var