Class: Shellfie::Themes::Configured
- Inherits:
-
Object
- Object
- Shellfie::Themes::Configured
- Defined in:
- lib/shellfie/themes/configured.rb
Instance Method Summary collapse
- #button_colors ⇒ Object
- #button_style ⇒ Object
- #buttons_position ⇒ Object
- #color_for(name) ⇒ Object
- #colors ⇒ Object
- #font ⇒ Object
-
#initialize(base_theme, name:, colors: {}, window_decoration: {}, font: {}) ⇒ Configured
constructor
A new instance of Configured.
- #name ⇒ Object
- #title_alignment ⇒ Object
- #window_decoration ⇒ Object
Constructor Details
#initialize(base_theme, name:, colors: {}, window_decoration: {}, font: {}) ⇒ Configured
Returns a new instance of Configured.
6 7 8 9 10 11 12 |
# File 'lib/shellfie/themes/configured.rb', line 6 def initialize(base_theme, name:, colors: {}, window_decoration: {}, font: {}) @base_theme = base_theme @name = name @colors = colors || {} @window_decoration = window_decoration || {} @font = font || {} end |
Instance Method Details
#button_colors ⇒ Object
30 31 32 |
# File 'lib/shellfie/themes/configured.rb', line 30 def @base_theme. end |
#button_style ⇒ Object
34 35 36 |
# File 'lib/shellfie/themes/configured.rb', line 34 def @base_theme. end |
#buttons_position ⇒ Object
38 39 40 |
# File 'lib/shellfie/themes/configured.rb', line 38 def @base_theme. end |
#color_for(name) ⇒ Object
46 47 48 49 50 |
# File 'lib/shellfie/themes/configured.rb', line 46 def color_for(name) return name if name.is_a?(String) && name.start_with?("#") colors[name.to_sym] || colors[:foreground] end |
#colors ⇒ Object
22 23 24 |
# File 'lib/shellfie/themes/configured.rb', line 22 def colors @base_theme.colors.merge(@colors) end |
#font ⇒ Object
26 27 28 |
# File 'lib/shellfie/themes/configured.rb', line 26 def font @base_theme.font.merge(@font) end |
#name ⇒ Object
14 15 16 |
# File 'lib/shellfie/themes/configured.rb', line 14 def name @name end |
#title_alignment ⇒ Object
42 43 44 |
# File 'lib/shellfie/themes/configured.rb', line 42 def title_alignment @base_theme.title_alignment end |
#window_decoration ⇒ Object
18 19 20 |
# File 'lib/shellfie/themes/configured.rb', line 18 def window_decoration deep_merge(@base_theme.window_decoration, @window_decoration) end |