add contribution information

This commit is contained in:
Jinhao 2018-12-07 05:30:11 +08:00
parent 32333c0900
commit 6378c3bf3c
2 changed files with 11 additions and 7 deletions

View File

@ -1,13 +1,15 @@
/**
* A Button Implementation
* Nana C++ Library(http://www.nanapro.org)
* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
* Copyright(C) 2003-2018 Jinhao(cnjinhao@hotmail.com)
*
* Distributed under the Boost Software License, Version 1.0.
* (See accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* @file: nana/gui/widgets/button.hpp
* @contributor
* besh81(pr#361)
*/
#ifndef NANA_GUI_WIDGET_BUTTON_HPP
@ -90,7 +92,12 @@ namespace nana{
button(window, const char* caption, bool visible = true);
button(window, const nana::rectangle& = rectangle(), bool visible = true);
button& icon(const nana::paint::image&);
/// Shows an icon in front of caption
/**
* @param image Icon to be shown. If image is empty, the current icon is erased from the button.
* @return the reference of *this.
*/
button& icon(const nana::paint::image& image);
button& enable_pushed(bool);
bool pushed() const;
button& pushed(bool);

View File

@ -381,11 +381,8 @@ namespace nana{ namespace drawerbase
{
if(img.empty())
{
if(attr_.icon)
{
delete attr_.icon;
attr_.icon = 0;
}
delete attr_.icon;
attr_.icon = nullptr;
return;
}