How to use

<< Click to Display Table of Contents >>

Navigation:  Programming > User Interface > Modify the look and feel of the editor > SVG Toolbar Icons >

How to use

You will need Delphi XE2 or later.

 

You only need to add the unit WPICONS to the project to load the Toolbar resource automatically.

 

clip0034

 

When switching or selection a theme you need to set the global variable glWPImageListAutoAdaptTextColor to 1 for the dark mode and to 0 otherwise.

 

procedure TForm1.DarkmodeClick(Sender: TObject);

begin

if Darkmode.Checked then

begin

    WPRuler1.Design := wpRulerOrange;

    glWPImageListAutoAdaptTextColor := 1;

    TStyleManager.TrySetStyle('Windows10 SlateGray');

end

else

begin

   WPRuler1.Design := wpRulerBlue;

   glWPImageListAutoAdaptTextColor := 0;

   TStyleManager.TrySetStyle('Luna');

end;

end;

 

To use WPSVGPRO instead of the inbuilt "Light" version you need to activate the compiler symbol WPSVGPRO. In that case WPSVGLight will not be embedded.

 

To deactivate SVG support, and the SVG resource, activate the compiler symbol NO_SVG and do a BuildAll.