PDA

View Full Version : Button UI pressed colour not taking effect



tlloyduk
30 Aug 2017, 8:33 AM
Hi Guys

I'm using Themer 1.3 and struggling to actually customise the aspects of a UI that I want.

I've made a new "button" UI called "toggle-btn" and I'm applying it as so:



{
xtype: 'segmentedbutton',
items: [
{
ui: 'toggle-btn',
allowDepress: false,
enableToggle: true,
text: 'AND'
},
{
ui: 'toggle-btn',
allowDepress: false,
enableToggle: true,
pressed: true,
text: 'OR'
}
]
}


I open my theme in Themer and edit the toggle-btn UI. I set the background colour under "button defaults" to #BDBDBD. I scroll down to "Pressed" and I set the colour I want for when the button is pressed: #1565C0. See screenshot: https://snag.gy/2DQjsB.jpg

I refresh my theme, build project.... my toggle button correctly uses the background colour set but the pressed colour is still the theme default, as automatically set in: $button-default-background-color-pressed which is #1a2128 as I can see in Themer variables: https://snag.gy/O9ZVRW.jpg

See screenshot of end result: https://snag.gy/Hsyf3A.jpg

I would expect the "OR" button to be blue.... surely the UI should be overriding the default ? What am I doing wrong ?

Cheers for your help :((

Tim

tlloyduk
31 Aug 2017, 7:18 AM
Interesting.... I accidentally held CTRL whilst pressing the button and it turned the correct shade of blue ?!