Updated: 21.02.2017
Rus

New in the AlphaControls 2016 (version 11)

Support of forms scaling (automatic and manual).

Click image for enlarge.

In the TsSkinManager component the Options.ScaleMode property has been added with sm100, sm125, sm150, smAuto and smOldMode values. Default smOldMode value added for a backward compatibility. Application will have an old behaviour with this option, SkinManager will not have influence to the scaling of windows and glyphs.

sm100, sm125 and sm150 options allows to specify a scaling value manually, (100:100, 125:100 and 150:100 accordingly).

If smAuto value defined, then SkinManager will choose and use a scaling value automatically depending on the system configuration.


If glyphs are stored in the TsAlphaImageList component, then sizes of glyphs in application changed automatically:


Recommendations for developers of applications which scaled with using of the TsSkinManager.Options.ScaleMode property:
  • The TForm.Scaled property must be disabled.
  • TsSkinManager.ScaleInt function changes integer number accordingly to the current application scaling value. This function may be used for receiving of a new font height (for example) or other values in calculations.
  • For manual changing of the window scale (if needed) use the TsSkinManager.UpdateScale(Ctrl: TWinControl; iCurrentScale: integer = 100) procedure. This procedure changes size of form or control accordingly to the current application scaling value. The iCurrentScale parameter specifies current scale of the window.
  • Use the TsAlphaImageList component for storing of PNG glyphs, which will change their size accordingly to scale specified in the SkinManager.
Limitations, existing with using of the TsSkinManager.Options.ScaleMode property:
  • The TsSkinManager component must be active for using of the Options.ScaleMode property
  • System dialogs has scale which defined in the current Windows system, SkinManager doesn't have influence there.
  • Developer should be careful in manipulations with sizing and positioning of controls and with using of the Anchors property.
Possibility of custom forms showing in popup style.

For showing of a form as popup window it's enought to call the ShowPopupForm procedure. Two ShowPopupForm procedures are declared in the acPopupController.pas unit.

If first procedure called then popup window will be automatically aligned near the AOwnerControl. Second procedure allows to specify coordinates of the top left corner of the popup window.


New components
TsSkinSelector

This component searches available skins automatically and shows them in the popup list with preview. Changing of the current skin called automatically after choosing by user.

TsTrackEdit

This component allows to edit numbers with help of the popup window with TrackBar.

TsPopupBox

This component have a look of ComboBox control and allows to show any form as popup window instead of ComboBox list.

Firstly, should be created the form which will be shown after clicking on the TsPopupBox control. After creation this form must be specified in the TsPopupBox.PopupForm property. After clicking on the TsPopupBox by mouse or after pressing of "Alt+Down" the popup form will be shown.

Further processing of user actions is handled by developer. For example, the "Ok" button may be placed which will close the form and will change the TsPopupBox.Text property.

TsGradientPanel

This is a panel which filled by custom gradient. It's possible to use a color of the current skin for visually compatibility with all skins.

Use the PaintData property for defining of gradient colors and direction. Build-in editor of the PaintData.CustomGradient property is shown below:

New properties
TsSkinManager.MenuSupport.CustomFont and TsSkinManager.MenuSupport.Font

If CustomFont is True the developer have possibility to change a font of menus by using of the Font property.

This property works with active skins only.

TsColorSelect.PopupMode

This property allows to choose a mode of the color selecting. If property defined as cpmColorList then color must be choosen from popup list of colors. Otherwise, if property is cpmPickColor, then popup dialog will be used.

TsSkinProvider.DisabledBlendColor

Allows to change a color of forms fading when Form.Enabled property is False and the TsSkinProvider.DisabledBlendValue property used.

TsFrameBar.Items[i].Alignment

Allows to align a content of the title item horizontally.

TsTimePicker.Use12Hour

If property is active then time is shown in the 12 hours format (AM/PM).

TsDateEdit.IsEmpty

Returns True if value of the component is empty.

New procedures
procedure ChangeControlColors(AControl: TControl; AFontColor, AColor: TColor);

This procedure changes colors of background and font in the specified control. If clNone color is defined and control is skinned, then value of the color will be reseted to value which specified in the skin. Procedure declared in the sVclUtils.pas unit.

Other changes
Added internal "MAINCOLOR" section

This section defines a filling of the control by main color of the current skin, borders are invisible.

Big part of deprecated code was removed.