Skip to content

Commit

Permalink
Merge pull request #114 from ifloppy/sources
Browse files Browse the repository at this point in the history
Added dark mode support for Windows
  • Loading branch information
peazip authored Jan 25, 2024
2 parents e0a3cb6 + e3d9ea0 commit 1324b9f
Show file tree
Hide file tree
Showing 31 changed files with 15,621 additions and 11,014 deletions.
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*.o
*.ppu
*.exe
*.compiled
*.obj
*.a
27 changes: 27 additions & 0 deletions packages/metadarkstyle-main/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# metadarkstyle

## What is this?
metadarkstyle.lpk a package that adds dark theme to your program under windows 10!
metadarkstyledsgn226.lpk a package that adds dark theme to Lazarus 2.2.6 IDE
metadarkstyledsgn.lpk a package that adds dark theme to Lazarus trunk IDE

<details>
<summary> Image preview </summary>
<img src="https://github.com/zamtmn/metadarkstyle/blob/main/docs/2.png" />
<img src="https://github.com/zamtmn/metadarkstyle/blob/main/docs/1.png" />
</details>

## System requirements
Windows10 1809 and later

FPC 3.2.2 or trunk

Lazarus 2.2.6 or trunk

## How to install (update)?
0) For use this package you need Lazarus2.2.6 or trunk and Windows10
1) If You use old version metadarkstyledsgn on Lazarus 2.2.6 - deinstall it before update package
2) Open metadarkstyle.lpk as a package compile and install it
3) Open metadarkstyledsgn226.lpk for Lazarus2.2.6 or metadarkstyledsgn.lpk, compile and install it
4) Restart IDE applying changes and it should be painted black
5) Try Tools/Optins/DarkStyle to config package
52 changes: 52 additions & 0 deletions packages/metadarkstyle-main/metadarkstyle.lpk
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Package Version="5">
<PathDelim Value="\"/>
<Name Value="MetaDarkStyle"/>
<Type Value="RunAndDesignTime"/>
<Author Value="Andrey Zubarev ([email protected]) Alexander Koblov ([email protected])"/>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<OtherUnitFiles Value="src"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
</CompilerOptions>
<Description Value="Dark (or custom colored) theme for LCL applications"/>
<License Value="GNU Lesser General Public License as published by the Free Software Foundation either version 2.1 of the License, or (at your option) any later version."/>
<Version Minor="9"/>
<Files>
<Item>
<Filename Value="src\umetadarkstyle.pas"/>
<UnitName Value="uMetaDarkStyle"/>
</Item>
<Item>
<Filename Value="src\udarkstyleparams.pas"/>
<UnitName Value="uDarkStyleParams"/>
</Item>
<Item>
<Filename Value="src\udarkstyleschemesadditional.pas"/>
<UnitName Value="uDarkStyleSchemesAdditional"/>
</Item>
</Files>
<RequiredPkgs>
<Item>
<PackageName Value="LCL"/>
</Item>
<Item>
<PackageName Value="LCLBase"/>
</Item>
<Item>
<PackageName Value="FCL"/>
</Item>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
</Package>
</CONFIG>
22 changes: 22 additions & 0 deletions packages/metadarkstyle-main/metadarkstyle.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}

unit MetaDarkStyle;

{$warn 5023 off : no warning about unused units}
interface

uses
uMetaDarkStyle, uDarkStyleParams, uDarkStyleSchemesAdditional,
LazarusPackageIntf;

implementation

procedure Register;
begin
end;

initialization
RegisterPackage('MetaDarkStyle', @Register);
end.
52 changes: 52 additions & 0 deletions packages/metadarkstyle-main/metadarkstyledsgn.lpk
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Package Version="5">
<PathDelim Value="\"/>
<Name Value="metadarkstyledsgn"/>
<Type Value="RunAndDesignTime"/>
<Author Value="Andrey Zubarev ([email protected])"/>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<OtherUnitFiles Value="src"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
</CompilerOptions>
<Description Value="Dark (or custom colored) theme for Lazarus IDE"/>
<License Value="GNU Lesser General Public License as published by the Free Software Foundation either version 2.1 of the License, or (at your option) any later version."/>
<Version Minor="9"/>
<Files>
<Item>
<Filename Value="src\registermetadarkstyledsgn.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="registerMetaDarkStyleDSGN"/>
</Item>
<Item>
<Filename Value="src\metadarkstyledsgnoptionsframe.pas"/>
<UnitName Value="MetaDarkStyleDSGNOptionsFrame"/>
</Item>
</Files>
<RequiredPkgs>
<Item>
<PackageName Value="IdeConfig"/>
</Item>
<Item>
<PackageName Value="IDEIntf"/>
</Item>
<Item>
<PackageName Value="MetaDarkStyle"/>
</Item>
<Item>
<PackageName Value="FCL"/>
</Item>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
</Package>
</CONFIG>
23 changes: 23 additions & 0 deletions packages/metadarkstyle-main/metadarkstyledsgn.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}

unit metadarkstyledsgn;

{$warn 5023 off : no warning about unused units}
interface

uses
registerMetaDarkStyleDSGN, MetaDarkStyleDSGNOptionsFrame, LazarusPackageIntf;

implementation

procedure Register;
begin
RegisterUnit('registerMetaDarkStyleDSGN', @registerMetaDarkStyleDSGN.Register
);
end;

initialization
RegisterPackage('metadarkstyledsgn', @Register);
end.
54 changes: 54 additions & 0 deletions packages/metadarkstyle-main/metadarkstyledsgn226.lpk
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<CONFIG>
<Package Version="5">
<PathDelim Value="\"/>
<Name Value="metadarkstyledsgn226"/>
<Type Value="RunAndDesignTime"/>
<Author Value="Andrey Zubarev ([email protected])"/>
<CompilerOptions>
<Version Value="11"/>
<PathDelim Value="\"/>
<SearchPaths>
<IncludeFiles Value="$(LazarusDir)\ide\include\$(TargetOS)"/>
<Libraries Value="E:\lazarus\units\x86_64-win64\win32\"/>
<OtherUnitFiles Value="src;$(LazarusDir)\ide"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
</CompilerOptions>
<Description Value="Dark (or custom colored) theme for Lazarus IDE 2.2.6"/>
<License Value="GNU Lesser General Public License as published by the Free Software Foundation either version 2.1 of the License, or (at your option) any later version."/>
<Version Minor="9"/>
<Files>
<Item>
<Filename Value="src\registermetadarkstyledsgn.pas"/>
<HasRegisterProc Value="True"/>
<UnitName Value="registerMetaDarkStyleDSGN"/>
</Item>
<Item>
<Filename Value="src\metadarkstyledsgnoptionsframe.pas"/>
<UnitName Value="MetaDarkStyleDSGNOptionsFrame"/>
</Item>
</Files>
<RequiredPkgs>
<Item>
<PackageName Value="CodeTools"/>
</Item>
<Item>
<PackageName Value="IDEIntf"/>
</Item>
<Item>
<PackageName Value="MetaDarkStyle"/>
</Item>
<Item>
<PackageName Value="FCL"/>
</Item>
</RequiredPkgs>
<UsageOptions>
<UnitPath Value="$(PkgOutDir)"/>
</UsageOptions>
<PublishOptions>
<Version Value="2"/>
<UseFileFilters Value="True"/>
</PublishOptions>
</Package>
</CONFIG>
23 changes: 23 additions & 0 deletions packages/metadarkstyle-main/metadarkstyledsgn226.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{ This file was automatically created by Lazarus. Do not edit!
This source is only used to compile and install the package.
}

unit metadarkstyledsgn226;

{$warn 5023 off : no warning about unused units}
interface

uses
registerMetaDarkStyleDSGN, MetaDarkStyleDSGNOptionsFrame, LazarusPackageIntf;

implementation

procedure Register;
begin
RegisterUnit('registerMetaDarkStyleDSGN', @registerMetaDarkStyleDSGN.Register
);
end;

initialization
RegisterPackage('metadarkstyledsgn226', @Register);
end.
7 changes: 7 additions & 0 deletions packages/metadarkstyle-main/src/CustomDark.darkstylecolors
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
begin
Scheme:=DefaultDark;
CustomDrawScrollbars:=true;
CustomDrawPushButtons:=true;
CustomDrawComboBoxs:=true;
CustomDrawTreeViews:=true;
end.
5 changes: 5 additions & 0 deletions packages/metadarkstyle-main/src/CustomDark.lrs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
LazarusResources.Add('CustomDark','DARKSTYLECOLORS',[
'begin'#13#10' Scheme:=DefaultDark;'#13#10' CustomDrawScrollbars:=true;'#13
+#10' CustomDrawPushButtons:=true;'#13#10' CustomDrawComboBoxs:=true;'#13#10
+' CustomDrawTreeViews:=true;'#13#10'end.'
]);
Loading

0 comments on commit 1324b9f

Please sign in to comment.