Mercurial > octave
changeset 27749:b3ad1b9417c0
legend.m: Make icon height depend on the fontsize (bug #57269)
* legend.m (textitem_data): Make the icon height 70% of the fontsize in points.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Tue, 26 Nov 2019 15:37:50 +0100 |
parents | 5fc630696dc7 |
children | 597e50809a9c |
files | scripts/plot/appearance/legend.m |
diffstat | 1 files changed, 5 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/appearance/legend.m Tue Nov 26 20:28:28 2019 +0100 +++ b/scripts/plot/appearance/legend.m Tue Nov 26 15:37:50 2019 +0100 @@ -1028,7 +1028,11 @@ persistent hmargin = 3; persistent vmargin = 3; persistent item_width = 15; - persistent item_height = 7; + + units = get (hl, "fontunits"); + set (hl, "fontunits", "points"); + item_height = 0.7 * get (hl, "fontsize"); + set (hl, "fontunits", units); ext = get (objlist(:,1), "extent"); markers = get (objlist(:,2), "marker");