~eliasnaur/gio#43: 
Button with icons and text support

Hello, really don’t know if there’s a way to have buttons with text and icons?

Status
REPORTED
Submitter
Uti Michael
Assigned to
No-one
Submitted
8 months ago
Updated
3 months ago
Labels
No labels applied.

~eliasnaur 8 months ago

On Mon Oct 14, 2019 at 12:23 AM Uti Michael wrote:

Hello, really don’t know if there’s a way to have buttons with text and icons?

There is a button with text, and there is a button with an icon, but not one with both. I imagine it would be relatively straightforward to add icon support to the text variant.

-- elias

Uti Michael 8 months ago

You mean users can actually create custom button widgets?, seems I have to create custom layouts and there are unexportable functions like rrect and fill functions. Also are IconButtons only circular?

~eliasnaur 8 months ago

On Mon Oct 14, 2019 at 11:34 PM Uti Michael wrote:

You mean users can actually create custom button widgets?, seems I have to create custom layouts and there are unexportable functions like rrect and fill functions. Also are IconButtons only circular?

My suggestion was to send a patch that expanded the text button to optionally draw an icon.

However, since all of Gio is UNLICENSEd, you can also freely copy the necessary code and draw the icon button yourself.

-- elias

~metaclips 8 months ago

Hello, I was able to implement buttons with text and icon but currently having issues with reading image formats, png, jpg and svg. I noticed gio read image bytes in iconvg format, anyway we could use other image format or better still convert to icing

~metaclips 8 months ago

*iconvg

~metaclips 3 months ago

Hello, I made a PR that adds icon with text support. Wanted to know if you got it.

~eliasnaur 3 months ago

On Sun Mar 15, 2020 at 23:04, ~metaclips wrote:

Hello, I made a PR that adds icon with text support. Wanted to know if you got it.

I didn't, or I missed it. Can you please re-send to gio-patches@lists.sr.ht and CC me at mail@eliasnaur.com?

-- elias

~metaclips 3 months ago

I followed the contribution guide here https://gioui.org/doc/contribute but I also just sent another to gio-patches@lists.sr.ht

~eliasnaur 3 months ago

I haven't seen the patch, to the list nor to mail@eliasnaur.com. I don't know what's going wrong.

~metaclips 3 months ago

I honestly do not know what I'm doing wrong. Here's my command git send-email --to=~eliasnaur/gio-patches@lists.sr.ht --cc=mail@eliasnaur.com HEAD^ saved and sent mail with Result: OK

OK. Log says: Sendmail: /usr/sbin/sendmail -i ~eliasnaur/gio-patches@lists.sr.ht mail@eliasnaur.com utimichael9@gmail.com From: metaclips utimichael9@gmail.com To: ~eliasnaur/gio-patches@lists.sr.ht Cc: mail@eliasnaur.com, metaclips utimichael9@gmail.com Subject: [PATCH] material: add text support to icon button This implementation makes support for texts in iconbutton If no text is provided, a conventional iconbutton UI is shown Fixes #43 Signed-off-by: Michael Uti utimichael9@gmail.com Date: Mon, 16 Mar 2020 23:11:02 +0100 Message-Id: 20200316221102.90645-1-utimichael9@gmail.com X-Mailer: git-send-email 2.21.1 (Apple Git-122.3) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit

Result: OK

~metaclips referenced this from #43 3 months ago

~eliasnaur 3 months ago

On Mon Mar 16, 2020 at 10:16 PM, ~metaclips wrote:

I honestly do not know what I'm doing wrong. Here's my command git send-email --to=~eliasnaur/gio-patches@lists.sr.ht --cc=mail@eliasnaur.com HEAD^ saved and sent mail with Result: OK

OK. Log says: Sendmail: /usr/sbin/sendmail -i ~eliasnaur/gio- patches@lists.sr.ht mail@eliasnaur.com utimichael9@gmail.com

You're using your system's local sendmail. Is it configured to send mail through an email provider or for self-hosted SMTP? If not, follow step #2 from

https://git-send-email.io/#step-2

to set it up.

However, you can also fork the Gio project to your own git.sr.ht account and send the patch from the button on the front page of your fork.

-- elias

~metaclips 3 months ago

Indeed I was using a local sendmail. Got it to work. Thanks https://lists.sr.ht/~eliasnaur/gio-patches/patches/10021

Register here or Log in to comment, or comment via email.