mirror of
https://github.com/pocoproject/poco.git
synced 2025-04-16 23:12:57 +02:00
fixed Imagebutton size
This commit is contained in:
parent
c94cd468de
commit
8dddbfb147
@ -84,20 +84,21 @@ void ImageButtonCellRenderer::renderHead(const Renderable* pRenderable, const Re
|
|||||||
void ImageButtonCellRenderer::writeHTML(const ImageButtonCell* pButtonCell, bool showTxt, std::ostream& ostr)
|
void ImageButtonCellRenderer::writeHTML(const ImageButtonCell* pButtonCell, bool showTxt, std::ostream& ostr)
|
||||||
{
|
{
|
||||||
Image::Ptr ptrImg = pButtonCell->getImage();
|
Image::Ptr ptrImg = pButtonCell->getImage();
|
||||||
|
const Poco::WebWidgets::ImageButton* pOwner = static_cast<const Poco::WebWidgets::ImageButton*>(pButtonCell->getOwner());
|
||||||
|
poco_check_ptr (pOwner);
|
||||||
ostr << "'<div>";
|
ostr << "'<div>";
|
||||||
ostr << "<div>";
|
ostr << "<div>";
|
||||||
ostr << "<input src=\"" << Utility::safe(ptrImg->getURI().toString()) << "\"";
|
ostr << "<input src=\"" << Utility::safe(ptrImg->getURI().toString()) << "\"";
|
||||||
if (!ptrImg->getName().empty())
|
if (!pOwner->getName().empty())
|
||||||
ostr << " name=\"" << ptrImg->getName() << "\"";
|
ostr << " name=\"" << pOwner->getName() << "\"";
|
||||||
if (ptrImg->getWidth() > 0)
|
if (pOwner->getWidth() > 0)
|
||||||
ostr << " width=\"" << ptrImg->getWidth() << "\"";
|
ostr << " width=\"" << pOwner->getWidth() << "\"";
|
||||||
if (ptrImg->getHeight() > 0)
|
if (pOwner->getHeight() > 0)
|
||||||
ostr << " height=\"" << ptrImg->getHeight() << "\"";
|
ostr << " height=\"" << pOwner->getHeight() << "\"";
|
||||||
std::string tooltip = ptrImg->getToolTip();
|
std::string tooltip = pOwner->getToolTip();
|
||||||
if (!tooltip.empty())
|
if (!tooltip.empty())
|
||||||
ostr << " alt=\"" << Utility::safe(tooltip) << "\"";
|
ostr << " alt=\"" << Utility::safe(tooltip) << "\"";
|
||||||
const Poco::WebWidgets::ImageButton* pOwner = static_cast<const Poco::WebWidgets::ImageButton*>(pButtonCell->getOwner());
|
|
||||||
poco_check_ptr (pOwner);
|
|
||||||
if (pOwner->buttonClicked.hasJavaScriptCode())
|
if (pOwner->buttonClicked.hasJavaScriptCode())
|
||||||
{
|
{
|
||||||
ostr << " onclick=\"";
|
ostr << " onclick=\"";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user