Sha256: 6997161f3f58b4e95a240c1c5755e7bf437d8f325ebad9626d900bdaaf9d0cf9
Contents?: true
Size: 916 Bytes
Versions: 21
Compression:
Stored size: 916 Bytes
Contents
# encoding: utf-8 module Fidgit class ColorWell < RadioButton alias_method :color, :value # @param (see RadioButton#initialize) # @option (see RadioButton#initialize) def initialize(options = {}, &block) options = { width: default(:width), height: default(:height), color: default(:color), outline_color: default(:outline_color), checked_border_color: default(:checked, :border_color), }.merge! options @outline_color = options[:outline_color].dup super('', (options[:color] || options[:value]).dup, options) end protected def draw_background super draw_frame x + 2, y + 2, width - 4, height - 4, 1, z, @outline_color nil end protected def draw_foreground draw_rect x + 3, y + 3, width - 6, height - 6, z, value nil end end end
Version data entries
21 entries across 21 versions & 1 rubygems