Description |
A table defining the default visual style for the alerts generated by this module.
The following may be specified in this table (any other key is ignored):
Keys which affect the alert rectangle:
- fillColor - a table as defined by the
hs.drawing.color module to specify the background color for the alert, defaults to { white = 0, alpha = 0.75 }.
- strokeColor - a table as defined by the
hs.drawing.color module to specify the outline color for the alert, defaults to { white = 1, alpha = 1 }.
- strokeWidth - a number specifying the width of the outline for the alert, defaults to 2
- radius - a number specifying the radius used for the rounded corners of the alert box, defaults to 27
Keys which affect the text of the alert when the message is a string (note that these keys will be ignored if the message being displayed is already an hs.styledtext object):
- textColor - a table as defined by the
hs.drawing.color module to specify the message text color for the alert, defaults to { white = 1, alpha = 1 }.
- textFont - a string specifying the font to be used for the alert text, defaults to ".AppleSystemUIFont" which is a symbolic name representing the systems default user interface font.
- textSize - a number specifying the font size to be used for the alert text, defaults to 27.
- textStyle - an optional table, defaults to
nil , specifying that a string message should be converted to an hs.styledtext object using the style elements specified in this table. This table should conform to the key-value pairs as described in the documentation for the hs.styledtext module. If this table does not contain a font key-value pair, one will be constructed from the textFont and textSize keys (or their defaults); likewise, if this table does not contain a color key-value pair, one will be constructed from the textColor key (or its default).
- atScreenEdge - 0: screen center (default); 1: top edge; 2: bottom edge . Note when atScreenEdge>0, the latest alert will overlay above the previous ones if multiple alerts visible on same edge; and when atScreenEdge=0, latest alert will show below previous visible ones without overlap.
- fadeInDuration - a number in seconds specifying the fade in duration of the alert, defaults to 0.15
- fadeOutDuration - a number in seconds specifying the fade out duration of the alert, defaults to 0.15
If you modify these values directly, it will affect all future alerts generated by this module. To adjust one of these properties for a single alert, use the optional style argument to the hs.alert.show function.
|