Fixed theming bug in button and button group.

This commit is contained in:
2019-08-08 13:46:02 +02:00
parent cdc6461064
commit 97d33cf177
72 changed files with 255 additions and 844 deletions
+5 -2
View File
@@ -136,8 +136,8 @@ export default class Button extends PIXI.Container {
strokeActive: theme.strokeActive,
strokeActiveWidth: theme.strokeActiveWidth,
strokeActiveAlpha: theme.strokeActiveAlpha,
textStyle: theme.textStyle,
textStyleActive: theme.textStyleActive,
textStyle: {},
textStyleActive: {},
style: 'default',
radius: theme.radius,
disabled: false,
@@ -157,6 +157,9 @@ export default class Button extends PIXI.Container {
this.id = this.opts.id
this.opts.textStyle = Object.assign({}, theme.textStyle, this.opts.textStyle)
this.opts.textStyleActive = Object.assign({}, theme.textStyleActive, this.opts.textStyleActive)
if (typeof this.opts.icon === 'undefined' && typeof this.opts.iconActive !== 'undefined') {
this.opts.icon = this.opts.iconActive
} else if (typeof this.opts.icon !== 'undefined' && typeof this.opts.iconActive === 'undefined') {