Skip to content

Commit

Permalink
Small icons item to popup added
Browse files Browse the repository at this point in the history
  • Loading branch information
vhanla committed Sep 21, 2019
1 parent e30f9da commit ded1d97
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 17 deletions.
62 changes: 48 additions & 14 deletions main.dfm
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,16 @@ object Form1: TForm1
Top = 0
Width = 706
Height = 371
ActivePage = tbsSkins
ActivePage = tbsSettings
Align = alClient
Style = tsFlatButtons
TabOrder = 0
object tbsSettings: TTabSheet
Caption = 'tbsSettings'
TabVisible = False
DesignSize = (
698
361)
object UText1: TUText
AlignWithMargins = True
Left = 0
Expand Down Expand Up @@ -206,8 +209,8 @@ object Form1: TForm1
OnClick = chkAutoStartClick
end
object chkSkinEnabled: TUCheckBox
Left = 216
Top = 64
Left = 184
Top = 56
Width = 142
Height = 30
Hint = 'Shows a background skin f'
Expand All @@ -229,11 +232,33 @@ object Form1: TForm1
ParentShowHint = False
ShowHint = True
end
object ListBox1: TListBox
Left = 328
Top = 56
Width = 353
Height = 194
Anchors = [akLeft, akTop, akRight]
ItemHeight = 13
TabOrder = 7
end
object Button1: TButton
Left = 328
Top = 256
Width = 353
Height = 25
Caption = 'List Taskbar Elements'
TabOrder = 8
OnClick = Button1Click
end
end
object tbsAbout: TTabSheet
Caption = 'tbsAbout'
ImageIndex = 1
TabVisible = False
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object headingAbout: TUText
AlignWithMargins = True
Left = 0
Expand Down Expand Up @@ -397,11 +422,15 @@ object Form1: TForm1
Caption = 'tbsDocks'
ImageIndex = 2
TabVisible = False
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
object UText2: TUText
AlignWithMargins = True
Left = 0
Top = 20
Width = 698
Width = 53
Height = 28
Margins.Left = 0
Margins.Top = 20
Expand All @@ -416,7 +445,6 @@ object Form1: TForm1
Font.Style = []
ParentFont = False
TextKind = tkHeading
ExplicitWidth = 53
end
end
object tbsPinnedIcons: TTabSheet
Expand All @@ -436,33 +464,38 @@ object Form1: TForm1
Width = 698
end
inherited UButton5: TUButton
Anchors = [akTop]
OnClick = frameIcons1UButton5Click
end
inherited UButton2: TUButton
OnClick = frameIcons1UButton2Click
end
inherited UButton3: TUButton
Anchors = [akLeft, akTop, akBottom]
end
end
end
object tbsMore: TTabSheet
Caption = 'tbsMore'
ImageIndex = 4
TabVisible = False
ExplicitLeft = 0
ExplicitTop = 0
ExplicitWidth = 0
ExplicitHeight = 0
end
object tbsSkins: TTabSheet
Caption = 'tbsSkins'
ImageIndex = 5
TabVisible = False
ExplicitTop = 27
ExplicitHeight = 340
inline frmSkin1: TfrmSkin
Left = 0
Top = 0
Width = 698
Height = 240
Align = alTop
TabOrder = 0
ExplicitLeft = 88
ExplicitTop = 80
ExplicitWidth = 698
inherited UText3: TUText
Width = 698
end
Expand Down Expand Up @@ -797,8 +830,6 @@ object Form1: TForm1
Align = alTop
TabOrder = 5
TabStop = True
ExplicitLeft = -2
ExplicitTop = 192
end
object USymbolButton7: TUSymbolButton
Left = 0
Expand Down Expand Up @@ -828,9 +859,6 @@ object Form1: TForm1
TabOrder = 6
TabStop = True
OnClick = USymbolButton7Click
ExplicitLeft = 16
ExplicitTop = 168
ExplicitWidth = 250
end
end
object TrayIcon1: TTrayIcon
Expand All @@ -841,6 +869,7 @@ object Form1: TForm1
Top = 344
end
object PopupMenu1: TPopupMenu
OnPopup = PopupMenu1Popup
Left = 280
Top = 240
object mnuStart: TMenuItem
Expand Down Expand Up @@ -870,6 +899,10 @@ object Form1: TForm1
Caption = '&Center'
OnClick = mnuCenterClick
end
object SmallIcons1: TMenuItem
Caption = 'Small Icons'
OnClick = SmallIcons1Click
end
object N2: TMenuItem
Caption = '-'
Visible = False
Expand Down Expand Up @@ -904,6 +937,7 @@ object Form1: TForm1
Top = 344
end
object tmrOptions: TTimer
Interval = 250
OnTimer = tmrOptionsTimer
Left = 96
Top = 344
Expand Down
22 changes: 19 additions & 3 deletions main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ TForm1 = class(TUForm)
frmSkin1: TfrmSkin;
ListBox1: TListBox;
Button1: TButton;
SmallIcons1: TMenuItem;
procedure Exit1Click(Sender: TObject);
procedure FormShow(Sender: TObject);
procedure FormCreate(Sender: TObject);
Expand Down Expand Up @@ -124,6 +125,8 @@ TForm1 = class(TUForm)
procedure USymbolButton7Click(Sender: TObject);
procedure frameIcons1UButton1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure SmallIcons1Click(Sender: TObject);
procedure PopupMenu1Popup(Sender: TObject);
private
{ Private declarations }
ms: TPoint;
Expand Down Expand Up @@ -151,7 +154,6 @@ TForm1 = class(TUForm)
function SystemUsesLightTheme: Boolean;



public
{ Public declarations }
Taskbars: TTaskbars;
Expand Down Expand Up @@ -189,7 +191,7 @@ implementation

{$R *.dfm}

uses skinform, functions;
uses skinform, functions, settings;



Expand Down Expand Up @@ -229,6 +231,7 @@ procedure TForm1.mnuCenterClick(Sender: TObject);
end;



procedure TForm1.CreateParams(var Params: TCreateParams);
var
AeroEnabled: LongBool;
Expand Down Expand Up @@ -379,7 +382,8 @@ procedure TForm1.FormCreate(Sender: TObject);
begin
Self.ThemeManager := ThemeManager;
AutoStartState;

//CreateDB;
ResetDB;
Init;
tmrUpdateTBinfo.Enabled := True;
LoadINI;
Expand Down Expand Up @@ -645,6 +649,11 @@ procedure TForm1.mnuTrayClick(Sender: TObject);
SyncSettingsPage;
end;

procedure TForm1.PopupMenu1Popup(Sender: TObject);
begin
SmallIcons1.Checked := Taskbars.SmallIcons;
end;

procedure TForm1.ReceiveDataEvent(const Sender: TObject; AContentLength,
AReadCount: Int64; var Abort: Boolean);
var
Expand Down Expand Up @@ -685,6 +694,13 @@ procedure TForm1.SetAutoStart(runwithwindows: Boolean);
end;
end;

procedure TForm1.SmallIcons1Click(Sender: TObject);
begin
Taskbars.SmallIcons := not SmallIcons1.Checked;
SmallIcons1.Checked := Taskbars.SmallIcons;
Taskbars.Refresh;
end;

procedure TForm1.SyncSettingsPage;
begin
chkStart.State := cbsUnchecked;
Expand Down

0 comments on commit ded1d97

Please sign in to comment.