Sha256: 4f0251371d43863101d63c8ccd48154dc5604459540c9956e0e3257adc56ebd8
Contents?: true
Size: 924 Bytes
Versions: 28
Compression:
Stored size: 924 Bytes
Contents
module Redcar class EditView class SelectFontDialog < FilterListDialog def initialize super() fontdata = Redcar.app.focussed_window.controller.shell.get_display.get_font_list(nil, true) @matches = [] (0..(fontdata.length-1)).each do |i| @matches << fontdata[i].get_name unless @matches.include?(fontdata[i].get_name) end @matches.sort! end def close super end def update_list(filter) @last_list = @matches filtered_list = @last_list if filter.length >= 1 filtered_list = filter_and_rank_by(filtered_list, filter, filtered_list.length) do |match| match end end filtered_list end def selected(text, ix, closing=false) if @last_list close Redcar::EditView.font = text end end end end end
Version data entries
28 entries across 28 versions & 1 rubygems