Respond to font button selection
git-svn-id: file:///home/vcs/svn/jsweeper/trunk@15 6611ac79-6612-48ef-a1e9-b906f853523emaster
parent
c406cf7962
commit
969c520ef0
|
@ -296,6 +296,7 @@ Preferences::Preferences(BaseObjectType *cobject, const Glib::RefPtr<Gtk::Builde
|
|||
|
||||
check_activate_aliases->signal_clicked().connect(sigc::mem_fun(*this, &Preferences::on_check_activate_aliases_click));
|
||||
|
||||
fontbutton_font->signal_font_set().connect(sigc::mem_fun(*this, &Preferences::on_fontbutton_font_click));
|
||||
spin_cell_padding->signal_value_changed().connect(sigc::mem_fun(*this, &Preferences::on_spin_cell_padding_click));
|
||||
}
|
||||
|
||||
|
@ -341,6 +342,14 @@ void Preferences::on_check_activate_aliases_click()
|
|||
Refresh();
|
||||
}
|
||||
|
||||
void Preferences::on_fontbutton_font_click()
|
||||
{
|
||||
std::string font = fontbutton_font->get_font_name();
|
||||
cfg.FontFace = font.substr(0, font.find_last_of(' '));
|
||||
cfg.FontSize = ss_conv_to<int>(font.substr(font.find_last_of(' ') + 1));
|
||||
g->Refresh();
|
||||
}
|
||||
|
||||
void Preferences::on_spin_cell_padding_click()
|
||||
{
|
||||
cfg.CellPadding = spin_cell_padding->get_value();
|
||||
|
|
Loading…
Reference in New Issue