Style Sheets
Style sheets provides support to:
- set the theme used by OpenVPMS
- experiment with the style sheet parameters that define the layout of the OpenVPMS screens.
The screen is as follows:
The fields are:
|
A pull-down list of the available resolutions. Initially this will show 'Default' and the screen width and height will be that of your screen. |
|
The screen width and height corresponding to the resolution. |
|
The style sheet properties that may be customised. |
|
This column shows the expression used to determine the value of the property. |
The buttons are as follows:
|
Change the theme. See Themes below. |
|
Opens a window to allow you to add a new screen resolution - you can also edit the various settings. When you press the OK button, the current display will be updated to reflect your settings. |
|
Opens a window to allow you to modify the expressions for the currently selected resolution. To get these to be applied to the current screen, press the OK button on the edit screen, and then press the Add button and immediately OK it. |
|
Displays a window to allow you to set a screen width and height and then opens a new OpenVPMS window with that width and height. This allows you to see what the screens will look like on a screen of that size |
|
Discard all property changes made in this session |
|
Displays a window containing the current settings. Note that the properties are held as a default set with overrides for each resolution. Hence, if you press Export when the Resolution is shown as Default, there will be a full set of properties shown in the note window. However, if you call up say 800x600 resolution and then press Export, you will see only a very small number of properties - and these are the ones in the full set that are overridden for 800x600 resolution. |
Themes
OpenVPMS ships with a number of themes that determine the colour scheme used by OpenVPMS.
These can be changed by clicking Change Theme, and selecting one from the list.
This takes effect immediately; other users will see the theme change when they log in again.
Theme 1: theme-purple.properties
name = Purple primary = #7A1D67
Theme 2: theme-blue.properties
name = Blue primary = #1075BD secondary = #72BDF3 theme.button.foreground = #ffffff
Theme definition
Themes are defined in properties files located in <TOMCAT_HOME>/webapps/openvpms/WEB-INF/classes/style, named theme-<theme id>.properties.
Themes can define the colours used for the default.stylesheet (or site.stylesheet if a custom one is provided).
At a minimum themes should provide a primary colour and theme name. Other colours will be derived.
The following properties are supported:
|
The name of the theme |
|
The primary colour. Used for the top and left-hand menus. |
|
The secondary colour. Used for the primary menu button rollover colour, buttons, and dialogs. |
|
The same as the primary colour. |
|
The text colour on the left-hand and top menus. |
|
The title area colour. |
|
The same as the secondary colour. |
|
The text colour for buttons. |
|
The border colour for buttons. |
|
The button colour when pressed. |
|
The button text colour when pressed. |
|
The button border colour when pressed. |
|
The button colour when rolled over. |
|
The button text colour when rolled over. |
|
The button colour when disabled. |
|
The button text colour when disabled. |
|
The button border colour when disabled. |
|
The row selection colour. |
NOTE: these properties are subject to change.
Style sheets
OpenVPMS has a set of style sheets for different screen resolutions. This facility enables style sheet parameters to be modified for each resolution, define a new resolution, and to open a new window with a specified resolution to see how things look.
Note that any changes made will be lost when you log out. That is, this facility is for experimenting with the effects of stylesheet changes, not permanently making them.
For permanent changes, the properties files in the <TOMCAT HOME>/webapps/openvpms/WEB-INF/classes/style directory need to be edited.
If you are changing an existing resolution, say 800x600, then you only need to edit the file default-800x600.properties
If you are creating a new resolution, say 600x1024, then you need to create the file default-600x1024.properties and fill it with the information copied from the note window displayed by the Export button. Then you need to add the new resolution to the list in the default-resolutions.properties file.
Finally, you need to restart Tomcat to make the changes take effect.