Ticket #403 (closed enhancement: fixed)

Opened 7 months ago

Last modified 7 months ago

Supporting images on QButtons through HTML <button> tag

Reported by: grossini Owned by: somebody
Priority: minor Milestone: 1.1.1 Stable
Component: Other Version: 1.1 Development
Keywords: Qbutton Cc:

Description

the <button> tag of HTML 4.0 let us create colorful buttons that can be decorated with both images and fancy text.

At moment only text con be personalized in QButton.

With the proposed patched QButtonBase.class we can use <button> </button> tag introduced by HTML 4.0 and our ->text attribute can contain image.
e.g. $this->Text = '<img src="' . VIRTUAL_DIRECTORY . IMAGE_ASSETS . '/save_16.png">' . 'Download CVS';

Attachments

QButtonBase.class.zip (1.0 kB) - added by grossini 7 months ago.
proposed QButtonBase.class with mod. function GetControlHTML
ticket403.patch (0.8 kB) - added by alex94040 7 months ago.
Re-submitting previous contribution as a patch file for easy reviewing

Change History

Changed 7 months ago by grossini

proposed QButtonBase.class with mod. function GetControlHTML

Changed 7 months ago by alex94040

Re-submitting previous contribution as a patch file for easy reviewing

Changed 7 months ago by alex94040

  • status changed from new to in_QA

Grossini, thanks so much for your contribution! I reviewed the code and tested it, and everything looks good. I think it's ready to check in to the core!

Changed 7 months ago by alex94040

  • summary changed from Change to QButtonBase.class to support the <button> tag of HTML 4.0 to Supporting images on QButtons through HTML <button> tag

Changed 7 months ago by alex94040

  • status changed from in_QA to closed
  • resolution set to fixed

Checked in - changelist [682].

Changed 7 months ago by dugokontov

why don't you use QImageButton instead?

Changed 7 months ago by alex94040

LOL good question! I actually didn't know of the existence of a QImageButton, LOL. I guess now a regular button can be used in place of a QImageButton, which is not a bad thing :-)

Changed 7 months ago by VexedPanda

Is the <button> tag recognized by older browsers? I've got some reservations switching the core QButton over to this. I'd have prefered the introduction of a new QControl.

Changed 7 months ago by alex94040

Note: See TracTickets for help on using tickets.