mirror of
https://github.com/cyberarm/cyberarm_engine.git
synced 2025-12-16 13:12:34 +00:00
Add support back for fixed x and y positioning of elements, fixed theming not using deep_merge
This commit is contained in:
@@ -27,9 +27,6 @@ module CyberarmEngine
|
||||
@width = 0
|
||||
@height = 0
|
||||
|
||||
@fixed_x = @x if @x != 0
|
||||
@fixed_y = @y if @y != 0
|
||||
|
||||
@style.width = default(:width) || nil
|
||||
@style.height = default(:height) || nil
|
||||
|
||||
@@ -42,6 +39,7 @@ module CyberarmEngine
|
||||
end
|
||||
|
||||
def stylize
|
||||
set_static_position
|
||||
set_border_thickness(@style.border_thickness)
|
||||
|
||||
set_padding(@style.padding)
|
||||
@@ -52,6 +50,11 @@ module CyberarmEngine
|
||||
set_border_color(@style.border_color)
|
||||
end
|
||||
|
||||
def set_static_position
|
||||
@x = @style.x if @style.x != 0
|
||||
@y = @style.y if @style.y != 0
|
||||
end
|
||||
|
||||
def set_background(background)
|
||||
@style.background = background
|
||||
@style.background_canvas.background = background
|
||||
|
||||
@@ -12,7 +12,7 @@ module CyberarmEngine
|
||||
def theme_defaults(options)
|
||||
raise "Error" unless self.class.ancestors.include?(CyberarmEngine::Element)
|
||||
_theme = THEME
|
||||
_theme = _theme.merge(options[:theme]) if options[:theme]
|
||||
_theme = deep_merge(_theme, options[:theme]) if options[:theme]
|
||||
_theme.delete(:theme) if options[:theme]
|
||||
|
||||
hash = {}
|
||||
|
||||
Reference in New Issue
Block a user