lib/glimmer/swt/button_proxy.rb in glimmer-dsl-opal-0.28.3 vs lib/glimmer/swt/button_proxy.rb in glimmer-dsl-opal-0.29.0

- old
+ new

@@ -1,6 +1,6 @@ -# Copyright (c) 2020-2021 Andy Maleh +# Copyright (c) 2020-2022 Andy Maleh # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, @@ -77,15 +77,16 @@ end def dom input_text = @text input_id = id - input_style = css + input_style = "min-width: 32px; min-height: 32px; #{css}" input_args = {} input_disabled = @enabled ? {} : {'disabled': 'disabled'} input_args = input_args.merge(type: 'password') if has_style?(:password) @dom ||= html { - button(input_args.merge(id: input_id, class: name, style: input_style, style: 'min-width: 32px; min-height: 32px;').merge(input_disabled)) { + # TODO `:style` key is duplicated twice + button(input_args.merge(id: input_id, class: name, style: input_style).merge(input_disabled)) { input_text.to_s == '' ? ' ' : input_text } }.to_s end end