mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 13:12:34 +00:00
Updated ToggleButton and CheckBox width/height handling
This commit is contained in:
@@ -11,9 +11,6 @@ module CyberarmEngine
|
||||
|
||||
add(@toggle_button)
|
||||
add(@label)
|
||||
|
||||
@style.width = @toggle_button.width + @label.width
|
||||
@style.height = @toggle_button.height + @label.height
|
||||
end
|
||||
|
||||
def text=(text)
|
||||
|
||||
@@ -38,7 +38,10 @@ module CyberarmEngine
|
||||
def recalculate
|
||||
super
|
||||
|
||||
@style.width = @text.textobject.text_width(@options[:checkmark])
|
||||
_width = dimensional_size(@style.width, :width)
|
||||
_height= dimensional_size(@style.height,:height)
|
||||
@width = _width ? _width : @text.textobject.text_width(@options[:checkmark])
|
||||
@height = _height ? _height : @text.height
|
||||
update_background
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user