31
31
# GTK signal handlers
32
32
@window.signal_connect('delete_event') { hide }
34
@system_ppi_setting_label.markup = sprintf("(%d x %d)", system_ppi_horizontal, system_ppi_vertical)
34
@builder.get_object('system_ppi_setting_label').markup = sprintf("(%d x %d)", system_ppi_horizontal, system_ppi_vertical)
36
36
on_key_press(Gdk::Keyval::GDK_Escape) { hide }
39
def foreground_color ; return @foreground_color_button.color ; end
40
def background_color ; return @background_color_button.color ; end
41
def font ; return @text_fontbutton.font_name ; end
42
def watch_mouse? ; return @watch_mouse_checkbutton.active? ; end
43
def watch_mouse=(value) ; @watch_mouse_checkbutton.active = value ; end
39
def foreground_color ; return @builder.get_object('foreground_color_button').color ; end
40
def background_color ; return @builder.get_object('background_color_button').color ; end
41
def font ; return @builder.get_object('text_fontbutton').font_name ; end
42
def watch_mouse? ; return @builder.get_object('watch_mouse_checkbutton').active? ; end
43
def watch_mouse=(value) ; @builder.get_object('watch_mouse_checkbutton').active = value ; end
44
44
attr_reader :opacity
47
if @use_custom_ppi_radiobutton.active?
48
@ppi_horizontal_spinbutton.value
47
if @builder.get_object('use_custom_ppi_radiobutton').active?
48
@builder.get_object('ppi_horizontal_spinbutton').value
50
50
system_ppi_horizontal
55
if @use_custom_ppi_radiobutton.active?
56
@ppi_vertical_spinbutton.value
55
if @builder.get_object('use_custom_ppi_radiobutton').active?
56
@builder.get_object('ppi_vertical_spinbutton').value
58
58
system_ppi_vertical