Thanks, added an override for the splitbutton and now it's working. Made some changes where i compared the Button getTemplate with this override:
Code:
getTemplate:function () { return [{
reference: 'innerElement',
cls: Ext.baseCSSPrefix + 'splitBody-el',
children: [{
reference: 'splitInnerElement',
cls: Ext.baseCSSPrefix + 'splitInner-el',
children: [{
reference: 'bodyElement',
cls: Ext.baseCSSPrefix + 'body-el',
children: [{
cls: Ext.baseCSSPrefix + 'icon-el ' + Ext.baseCSSPrefix + 'font-icon',
reference: 'iconElement'
}, {
reference: 'textElement',
cls: Ext.baseCSSPrefix + 'text-el'
}]
},
this.getButtonTemplate()
]
}, {
reference: 'arrowElement',
cls: Ext.baseCSSPrefix + 'splitArrow-el',
children: [{
reference: 'splitArrowElement',
cls: Ext.baseCSSPrefix + 'arrow-el ' + Ext.baseCSSPrefix + 'font-icon'
}
]
}
]
}, {
reference: 'badgeElement',
cls: Ext.baseCSSPrefix + 'badge-el'
}, this.getArrowButtonTemplate()
];
}
I have added some styling that was also applied to the badge element of a Button, but for some reason it displays it kinda weird:
ghkb1aO.png
And this is the CSS I managed to find for the badge element of a Button:
Code:
.x-big.x-splitButton.x-badge-el { font-size: 13px;
line-height: 16px;
}
.x-splitButton.x-has-badge .x-badge-el {
display: block;
}
.x-splitButton .x-badge-el {
color: #222;
color: var(--accent-foreground-color);
border-color: transparent;
border-radius: 32px;
min-width: 24px;
top: -10px;
right: -10px;
padding: 4px;
max-width: 55%;
font-size: 12px;
line-height: 16px;
font-family: Roboto, sans-serif;
background-color: #ff9800;
background-color: var(--accent-color);
background-image: none;
}
Edit: Figured it out, turns out the .x-button .x-badge-el didn't apply to the SplitButton where position: absolute was set. So the working version now:
Code:
.x-big.x-splitButton.x-badge-el { font-size: 13px;
line-height: 16px;
}
.x-splitButton.x-has-badge .x-badge-el {
display: block;
}
.x-splitButton .x-badge-el {
color: #222;
color: var(--accent-foreground-color);
border-color: transparent;
border-radius: 32px;
min-width: 24px;
top: -10px;
right: -10px;
padding: 4px;
max-width: 55%;
font-size: 12px;
line-height: 16px;
font-family: Roboto, sans-serif;
background-color: #ff9800;
background-color: var(--accent-color);
background-image: none;
position: absolute;
}
.x-big .x-splitButton.x-arrow-align-right .x-splitInner-el {
border-bottom-left-radius: 2px;
border-top-left-radius: 2px;
width: 90%;
}