HbToolButton{
    layout:icon_button;
}

HbToolButton[icon][!text]{	
    layout:icon_button;
}

HbToolButton[!icon][text]{
    layout:text_button;
}

HbToolButton[icon][text]{
    layout:icon_text_button;
}

HbToolButton[toolbutton_extension_layout="true"][icon][text] {
    layout: icon_text_button_extension;
}

HbToolBar > HbToolButton[text][orientation="2"] {
    min-width:15un;
    min-height:1un;
    pref-height:var(hb-param-widget-toolbar-height);
}

HbToolBar > HbToolButton[icon][!text][orientation="2"] {
    min-width:9un;
    min-height:1un;
    pref-height:var(hb-param-widget-toolbar-height);
}

HbToolBar > HbToolButton[orientation="1"] {
    pref-width:var(hb-param-widget-chrome-height);
    min-width:1un;
    min-height:var(hb-param-widget-toolbar-height);
}

HbToolBar > HbToolButton[orientation="2"]::text {
    text-align: center;
}

HbToolBar > HbToolButton[orientation="1"]::text {
    left:-var(hb-param-margin-gene-middle-horizontal);
    right:var(hb-param-margin-gene-middle-horizontal);
    text-align: left;
}

HbToolButton[toolbutton_extension_layout]{
    fixed-width:expr(1/3*var(hb-param-screen-short-edge)-var(hb-param-margin-gene-popup-list)-var(hb-param-margin-gene-popup-list));
    min-height:var(hb-param-widget-toolbar-height);
}

HbToolButton::text{
    left:-var(hb-param-margin-gene-left);
    right:var(hb-param-margin-gene-right);
    font-variant:primary;
    text-height:var(hb-param-text-height-tiny);
    text-align: center center;
    text-line-count-max: 2;
}

HbToolButton::icon{
    fixed-width:var(hb-param-graphic-size-function);
    fixed-height:var(hb-param-graphic-size-function);
}

HbToolButton::background{
    left:0un;
    right:0un;
    top:0un;
    bottom:0un;
}

HbToolButton[toolbutton_extension_layout="true"][!icon][text]::text {
    text-align: left;
}

HbToolButton[toolbutton_extension_layout="true"][icon][text]::text {
    bottom:var(hb-param-margin-gene-bottom);
}

HbToolBar > HbToolButton[icon][text]::icon{
    left:-var(hb-param-margin-gene-left);
}

HbToolBar > HbToolButton[icon][text]::text{
    left:-var(hb-param-margin-gene-middle-horizontal);
    right:var(hb-param-margin-gene-right);
    font-variant:primary;
    text-height:var(hb-param-text-height-tiny);
    text-align: left;
}

HbToolButton[toolbutton_extension_layout="true"][icon][text]::icon {
    top:-var(hb-param-margin-gene-middle-vertical);
}

HbToolButton[toolbutton_extension_layout="true"][icon][text]::text{
    left:-var(hb-param-margin-gene-middle-horizontal);
    right:var(hb-param-margin-gene-middle-horizontal);
    top:-var(hb-param-margin-gene-middle-vertical);
    bottom:var(hb-param-margin-gene-middle-vertical);
    font-variant:primary;
    text-height:var(hb-param-text-height-tiny);
    text-align:center center;
    text-line-count-max: 1;
}

HbToolBar > HbToolButton[dialogtoolbar][!icon]::text {
    left:-0.75un;
    right:0.75un;
    font-variant:primary;
    text-height:var(hb-param-text-height-primary);
    text-align:center center;
    text-line-count-max: 1;
}

HbToolBar > HbToolButton[dialogtoolbar][icon]::text {
    left:-0.75un;
    right:0.75un;
    font-variant:primary;
    text-height:var(hb-param-text-height-primary);
    text-align:left;
    text-line-count-max: 1;
}

HbTitleBar > HbToolButton[buttonStyle="0"]::icon{
    fixed-width:var(hb-param-graphic-size-secondary);
    fixed-height:var(hb-param-graphic-size-secondary);
}

HbTitleBar > HbToolButton[buttonStyle="1"]::icon{
    fixed-width:var(hb-param-graphic-size-function);
    fixed-height:var(hb-param-graphic-size-function);
}

HbTitleBar > HbToolButton[buttonStyle="2"]::icon{
    fixed-width:var(hb-param-graphic-size-function);
    fixed-height:var(hb-param-graphic-size-function);
}

HbTitleBar > HbToolButton[buttonStyle="3"]::icon{
    fixed-width:var(hb-param-graphic-size-primary-small);
    fixed-height:var(hb-param-graphic-size-primary-small);
}

