Sha256: c955965e704b9a3f133cf794fb0c3296f52b5c87d22f736528e13c0f65f88490

Contents?: true

Size: 793 Bytes

Versions: 2

Compression:

Stored size: 793 Bytes

Contents

require 'whirled_peas/utils/title_font'

require_relative 'bg_color'
require_relative 'text_color'

module WhirledPeas
  module Settings
    class Theme
      attr_reader :color, :bg_color, :title_font

      def color=(value)
        @color = TextColor.validate!(value)
      end

      def bg_color=(value)
        @bg_color = BgColor.validate!(value)
      end

      def border_color=(value)
        @border_color = TextColor.validate!(value)
      end

      def border_color
        @border_color || color
      end

      def axis_color=(value)
        @axis_color = TextColor.validate!(value)
      end

      def axis_color
        @axis_color || border_color
      end

      def title_font=(value)
        @title_font = Utils::TitleFont.validate!(value)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
whirled_peas-0.11.0 lib/whirled_peas/settings/theme.rb
whirled_peas-0.10.0 lib/whirled_peas/settings/theme.rb