mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 21:22:33 +00:00
Updated ToggleButton and CheckBox width/height handling
This commit is contained in:
@@ -11,9 +11,6 @@ module CyberarmEngine
|
|||||||
|
|
||||||
add(@toggle_button)
|
add(@toggle_button)
|
||||||
add(@label)
|
add(@label)
|
||||||
|
|
||||||
@style.width = @toggle_button.width + @label.width
|
|
||||||
@style.height = @toggle_button.height + @label.height
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def text=(text)
|
def text=(text)
|
||||||
|
|||||||
@@ -38,7 +38,10 @@ module CyberarmEngine
|
|||||||
def recalculate
|
def recalculate
|
||||||
super
|
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
|
update_background
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user