动态加载皮肤

This commit is contained in:
sgwp 2024-11-12 11:12:34 +08:00
parent fa72f24442
commit 11eea17fa9
2 changed files with 16 additions and 27 deletions

View File

@ -8,7 +8,8 @@ object BaseDataLink: TBaseDataLink
NativeStyle = False
ScrollbarMode = sbmClassic
SkinName = 'WXI'
RenderMode = rmGDIPlus
RenderMode = rmGDI
ShowFormShadow = bFalse
UseSkinsInPopupMenus = False
Left = 288
Top = 96
@ -48,7 +49,7 @@ object BaseDataLink: TBaseDataLink
NativeStyle = False
ScrollbarMode = sbmClassic
SkinName = 'WXI'
RenderMode = rmGDIPlus
RenderMode = rmGDI
Left = 253
Top = 12
end

View File

@ -3,28 +3,12 @@ unit U_BaseDataLink;
interface
uses
System.SysUtils,windows,forms, System.Classes, dxSkinsCore,
System.SysUtils,windows,forms, System.Classes,
dxSkinsDefaultPainters, dxCore, cxClasses,
cxLookAndFeels, dxSkinsForm, cxContainer, cxEdit,
System.ImageList, Vcl.ImgList, Vcl.Controls, cxImageList, cxGraphics, cxStyles,
dxSkinBasic, dxSkinWXI, dxLayoutLookAndFeels,
cxLocalization, dxSkinHighContrast, dxSkinBlack, dxSkinBlue, dxSkinBlueprint,
dxSkinCaramel, dxSkinCoffee, dxSkinDarkroom, dxSkinDarkSide,
dxSkinDevExpressDarkStyle, dxSkinDevExpressStyle, dxSkinFoggy,
dxSkinGlassOceans, dxSkiniMaginary, dxSkinLilian, dxSkinLiquidSky,
dxSkinLondonLiquidSky, dxSkinMcSkin, dxSkinMetropolis, dxSkinMetropolisDark,
dxSkinMoneyTwins, dxSkinOffice2007Black, dxSkinOffice2007Blue,
dxSkinOffice2007Green, dxSkinOffice2007Pink, dxSkinOffice2007Silver,
dxSkinOffice2010Black, dxSkinOffice2010Blue, dxSkinOffice2010Silver,
dxSkinOffice2013DarkGray, dxSkinOffice2013LightGray, dxSkinOffice2013White,
dxSkinOffice2016Colorful, dxSkinOffice2016Dark, dxSkinOffice2019Black,
dxSkinOffice2019Colorful, dxSkinOffice2019DarkGray, dxSkinOffice2019White,
dxSkinPumpkin, dxSkinSeven, dxSkinSevenClassic, dxSkinSharp, dxSkinSharpPlus,
dxSkinSilver, dxSkinSpringtime, dxSkinStardust, dxSkinSummer2008,
dxSkinTheAsphaltWorld, dxSkinTheBezier, dxSkinValentine,
dxSkinVisualStudio2013Blue, dxSkinVisualStudio2013Dark,
dxSkinVisualStudio2013Light, dxSkinVS2010, dxSkinWhiteprint,
dxSkinXmas2008Blue;
dxSkinBasic, dxLayoutLookAndFeels,
cxLocalization;
type
TBaseDataLink = class(TDataModule)
@ -74,12 +58,7 @@ var
begin
RootLookAndFeel.NativeStyle := False;
gFontSize:=0;
// pathStr:=ExtractFilePath(Application.ExeName) + '\AllSkins.skinres';
// if FileExists(pathStr) then
// begin
// dxSkinsUserSkinLoadFromFile(pathStr, 'WXI');
// RootLookAndFeel.SkinName := sdxSkinsUserSkinName;
// end;
if (fileexists(ExtractFilePath(Application.ExeName) + 'devchs.ini') = true)
then
begin
@ -93,6 +72,15 @@ begin
begin
dxSkinController1.UseSkins:=false;
dxSkinController1.SkinName:='';
end
else
begin
pathStr:=ExtractFilePath(Application.ExeName) + '\AllSkins.skinres';
if FileExists(pathStr) then
begin
dxSkinsUserSkinLoadFromFile(pathStr, 'WXI');
RootLookAndFeel.SkinName := sdxSkinsUserSkinName;
end;
end;
// gGridNativeSet:=isGridNativeSet();
//