refactor some functions of button

This commit is contained in:
Jinhao 2015-07-22 01:17:02 +08:00
parent e47d8504ea
commit 6a93295bcf
2 changed files with 1 additions and 8 deletions

View File

@ -101,8 +101,6 @@ namespace nana{
bool transparent() const;
button& edge_effects(bool enable);
private:
void _m_shortkey();
private:
//Overrides widget virtual functions
void _m_complete_creation() override;

View File

@ -501,16 +501,11 @@ namespace nana{ namespace drawerbase
return *this;
}
void button::_m_shortkey()
{
get_drawer_trigger().emit_click();
}
void button::_m_complete_creation()
{
events().shortkey.connect_unignorable([this]
{
_m_shortkey();
get_drawer_trigger().emit_click();
});
}