Font size of top & left panel menu items
Submitted by Guest on Wed, 21/08/2013 - 05:24
I have been asked to increase the size of the top and left panel menu items (ie the Customers|Patients|Suppliers|etc in the top line and [for Customers] the Information|Documents|Estimates|etc in the left panel)
I had hoped that the size of these was controlled by one of the font.h4.size or font.h5.size rather than solely by the base font.size. However, experimentation would appear to indicate that this is not the case and that one cannot adjust the menu item sizes independently of the base font size.
Is this indeed the case?
Regards, Tim G
Re: Font size of top & left panel menu items
The button style is determined by MainPane.Menu.Button style:
If you increase the font size, you might need to play around with the MainPane.Menu.height and MainPane.separatorPosition properties.
Re: Font size of top & left panel menu items
Tim - thanks for this. The practice manager is happy and we will go with a 1.333 scaling. Initially I used the h4 font (because I didn't think h4 was used) and I tweaked mainPane.Menu.height to be
max($font.h4.size + 6, 18) and it worked wonderfully. Then I noticed that h4 was in use, so I thought - no sweat - h6 is not used.
So I cloned the h5 definition to build h6, and set font.h6.size = $font.size * 1.333 and adjusted the above mainPane.Menu.height to use $font.h6.size.
However, this screws things right royally - you lose all css, and if you go to Admin|Stylesheets it bitches as follows:
<error-report>
<version>1.7-SNAPSHOT</version>
<revision>5415</revision>
<message>Undefined variable: font.h6.size</message>
<exception>
<type>org.openvpms.web.echo.style.StyleSheetException</type>
<message>Failed to evaluate expression: max($font.h6.size + 6, 18)</message>
My conclusion is that I am being too clever, and I cannot define h6 just in the default.stylesheet - somewhere lower down in the echo setup, h6 needs to be defined.
I can do what I want, but it would be neat if h6 was available to set the size of the menu items.
Regards, Tim G
Re: Font size of top & left panel menu items
The font.h4.size is already defined as $font.size * 1.333, so can't you just do:
<property name="font"> <font size="${font.h4.size}" bold="true"> <typeface name="${font.typeface}"/> </font> </property>
?
Re: Font size of top & left panel menu items
Yes Tim I could have, but it would be nice to be able to set the Menu item font size independently of what H4 is used for.
Regards, Tim G