bncs_style2

bncs_style2 - button drawing functions

Description

This is fundamentally the same as the original drawing DLL - bncs_style.dll but this version is configurable.

Configuration

Configuration is to be found in:

<CC_ROOT>\<CC_SYSTEM>\config\stylesheet\bncs_style2.ini

This file can have as many sections as you like - each section name is the name of the style that you tell panelman/visual editor to use. It cannot be the same as any other existing style e.g.

  • Windows
  • Motif
  • Platinum
  • CDE
  • MotifPlus
  • SGI
  • bncs_style
  • bncs_style2
  • bncs_style3
  • bncs_style4
  • bncs_style5

The colour palette entries below are used for various purposes by various controls and I've tried to indicate here where I know that they are used...but I might not have managed to list absolutely everything but it's entirely up to the controls which palette entries they use.

Entry | Notes
[basic] | Section name - this can be any value and is the same name as the style name selected for panelman/visual editor to display. It cannot be the same as an existing style name
font=SYSTEM | Font face
fontSize=10 | Font Size
fontWeight=88 | Font weight range 0 - 99 Values nominally map to: Light - 25 Normal - 50 DemiBold - 63 Bold - 75 Black - 87
fontItalic=false |
backgroundImage=bordlg.xpm | Background image for this style (see note below on types/path etc.)
popupTop=top.png | Popup dialog top border
popupBottom=bottom.png | Popup dialog bottom border
popupLeft=left.png | Popup dialog left-side border
popupRight=right.png | Popup dialog right-side border
popupTopLeft=topLeft.png | Popup dialog top level corner border
popupTopRight=topRight.png | Popup dialog top right corner border
popupBottomLeft=bottomLeft.png | Popup dialog bottom left corner border
popupBottomRight=bottomRight.png | Popup dialog bottom right corner border
roundedCorners=0 | Whether button corners should be rounded - this cuts a rounded hole for the button as well as drawing a few extra pixels in the corner of the control
sliderControlThickness=40 |
scrollBarExtent=40 | How big the slider is on a scroll bar
scrollBarSliderMin=40 | How small the slider on a scroll bar can become - usually it will shrink to a size proportional to the size of the thing it's scrolling.
buttonShading=NONE | Whether buttons (not labels) are drawn with shading. Values are: none - buttons are painted flat in - buttons have shading which shades from dark at the top to light at the bottom (looks like a concave surface) out - buttons have shading which shades from light at the top to dark at the bottom (looks like convex surface)
colouredButtonBorders=0 | borders can be drawn with the default colours (usually white/grey) or coloured according to the dynamic colour of the buttom
buttonBorderWidth=1 |
<role>.Background=#4d4d4d | Dialog background colour - may be completely obscured by backgroundImage
<role>.Foreground=#ffffff |
<role>.Base=#ffffff | Base colour of things like listboxes
<role>.Text=#000000 | Default button text colour
<role>.Button=#bfbfbf | Default button background colour
<role>.ButtonText=#ffffff | Listview uses this for row/column header text colour
<role>.Light=#ffffff | Button edge (when colouredButtonBorders=0)
<role>.Midlight=#f0f0f0 | Button edge (when colouredButtonBorders=0)<br/>Label edge (always - for raised/lowered label style)
<role>.Dark=#5f5f5f | Button edge (when colouredButtonBorders=0)
<role>.Mid=cyan | &nbsp
<role>.Shadow=#8f8f8f | Button edge (when colouredButtonBorders=0)<br/>Label edge (always - for raised/lowered label style)
<role>.Highlight=#000080 | Used by list controls
<role>.HighlightedText=#ffffff | Used by list controls
<role>.BrightText=#ffffff |
<role>.Link=#0000ff |
<role>.LinkVisited=#ff00ff |

Bitmaps

Qt supports many types e.g. jpg, png, bmp, xpm). Bitmap values are all optional - leave out for none/default

Style bitmaps are located in the following path:

%CC_ROOT%\%CC_SYSTEM%\config\stylesheet\<styleName>

Colour role

Colours have different roles - whether a button is active, inactive or disabled.

BNCS only uses active and disabled roles - inactive is available internally but the way that BNCS glues UIs together inactive has no meaningful use so active and inactive are the same thing.

Sample INI file

[basic]
font=SYSTEM
fontSize=10
fontWeight=88
fontItalic=false
backgroundImage=bordlg.xpm
roundedCorners=0
sliderControlThickness=40
scrollBarExtent=40
scrollBarSliderMin=40
buttonShading=NONE
colouredButtonBorders=0
buttonBorderWidth=1
active.Background=#4d4d4d
active.Foreground=#ffffff
active.Base=#ffffff
active.Text=#000000
active.Button=#bfbfbf
active.ButtonText=#ffffff
active.Light=#ffffff
active.Midlight=#f0f0f0
active.Dark=#5f5f5f
active.Mid=cyan
active.Shadow=#8f8f8f
active.Highlight=#000080
active.HighlightedText=#ffffff
active.BrightText=#ffffff
active.Link=#0000ff
active.LinkVisited=#ff00ff
disabled.Background=#4d4d4d
disabled.Foreground=#808080
disabled.Base=#000000
disabled.Text=#808080
disabled.Button=#4d4d4d
disabled.ButtonText=#808080
disabled.Light=red
disabled.Midlight=green
disabled.Dark=blue
disabled.Mid=yellow
disabled.Shadow=cyan
disabled.Highlight=#000080
disabled.HighlightedText=#ffffff
disabled.BrightText=#ffffff
disabled.Link=#0000ff
disabled.LinkVisited=#ff00ff

Version Control

Version | Date | Author | Comments
1.0.0.1 |  | David Yates | first versioned release
1.0.0.2 |  |  | puts font change back in app polish instead of widget polish
4.5.0.0 |  | David Yates | rebuild for Synergy
4.5.1.0 |  | Richard Kerry | Style 4 default font changed
4.5.1.1 |  | Richard Kerry | Style 5 added
4.5.2.? |  |  |
4.5.3.0 |  | David Yates | makes fully configurable - forks from bncs_style original
4.5.3.1 |  | David Yates | version committed to CVS
4.5.3.2 |  | David Yates | label style of background:none now doesn't try and paint the label
 | 27/02/2017 | David Yates | Docs Conversion to markdown minor revisions
4.5.4.0 | 18/04/2017 | David Yates | Makes border bitmaps a configurable item. Changes background image to be in style subdirectory.
4.5.5.0 | 18/04/2017 | David Yates | Adds popup margin pixelmetric
Build: trunk 3893 Atos © 2017