Horizontal Separator Element draws a Horizontal line at the given location.
| 7175 | # Horizontal Separator # |
| 7176 | # ---------------------------------------------------------------------- # |
| 7177 | class HorizontalSeparator(Element): |
| 7178 | """ |
| 7179 | Horizontal Separator Element draws a Horizontal line at the given location. |
| 7180 | """ |
| 7181 | |
| 7182 | def __init__(self, color=None, pad=None, p=None, key=None, k=None): |
| 7183 | """ |
| 7184 | :param color: Color of the line. Defaults to theme's text color. Can be name or #RRGGBB format |
| 7185 | :type color: (str) |
| 7186 | :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| 7187 | :type pad: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int |
| 7188 | :param p: Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
| 7189 | :type p: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int |
| 7190 | :param key: Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window |
| 7191 | :type key: str | int | tuple | object |
| 7192 | :param k: Same as the Key. You can use either k or key. Which ever is set will be used. |
| 7193 | :type k: str | int | tuple | object |
| 7194 | """ |
| 7195 | |
| 7196 | self.Orientation = 'horizontal' # for now only vertical works |
| 7197 | self.color = color if color is not None else theme_text_color() |
| 7198 | self.expand_x = True |
| 7199 | self.expand_y = None |
| 7200 | key = key if key is not None else k |
| 7201 | pad = pad if pad is not None else p |
| 7202 | |
| 7203 | super().__init__(ELEM_TYPE_SEPARATOR, pad=pad, key=key) |
| 7204 | |
| 7205 | |
| 7206 | HSeparator = HorizontalSeparator |
no outgoing calls
no test coverage detected