diff options
| author | Peter Kasza <peter.kasza@itinsight.hu> | 2019-05-05 11:29:44 +0200 |
|---|---|---|
| committer | Drew DeVault <sir@cmpwn.com> | 2019-05-05 09:25:59 -0600 |
| commit | 183d1bd54926b061a8e81585944b80fb9ab0f619 (patch) | |
| tree | 4d4a740ca4e69c6670f3a8a0e3726b68a0c1d1f0 /render.c | |
| parent | 84bfc6c7edf1465096f6663c6d931981bd924280 (diff) | |
Add fixed font-size option for indicator
This commit adds a new command line option called --font-size to
specify a fixed font size in the indicator. The default value for
font-size is 0, which means that the text will autoscale. Any other
positive value will result in a fixed text size.
Diffstat (limited to 'render.c')
| -rw-r--r-- | render.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -128,7 +128,11 @@ void render_frame(struct swaylock_surface *surface) { set_color_for_state(cairo, state, &state->args.colors.text); cairo_select_font_face(cairo, state->args.font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL); - cairo_set_font_size(cairo, arc_radius / 3.0f); + if (state->args.font_size > 0) { + cairo_set_font_size(cairo, state->args.font_size); + } else { + cairo_set_font_size(cairo, arc_radius / 3.0f); + } switch (state->auth_state) { case AUTH_STATE_VALIDATING: text = "verifying"; |
