Re: would like a stock button without the text (GtkButton), or a stock GtkToolButton that gets button-pressed-event
Gergely Polonkai <[email protected]> Fri, 24 Jun 2016 17:24:26 +0200
| Newsgroups | gmane.comp.gnome.glade.user |
|---|---|
| Message-ID | <CACczBUJvJc6YsXn87uMAwZm91c+pyu8Pbj4_8_bRC5Mta6LtQg@mail.gmail.com> |
--===============1202058324== Content-Type: multipart/alternative; boundary=001a114b0cfa1ec5c7053607c430 --001a114b0cfa1ec5c7053607c430 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Add a GtkButton, and inside a GtkImage. If you are using the Glade UI, you have to check the =E2=80=9CAdd custom content=E2=80=9D checkbox in the butt= on properties. Best, Gergely Thanks Gergely for your suggestion. But how would i do that entirely in glade, and using only stock images? TIA for any info. dan On Fri, Jun 24, 2016 at 1:04 AM, Gergely Polonkai <[email protected]> wrote: > Hello, > > how about you create a simple button, and add an image inside? Buttons ar= e > containers, you can put anything inside (even a button, but that doesn=E2= =80=99t > make much sense). > > Best, > Gergely > > > > Gergely Polonkai > [image: https://]about.me/gergely.polonkai > > <https://about.me/gergely.polonkai?promo=3Demail_sig&utm_source=3Demail_s= ig&utm_medium=3Demail_sig&utm_campaign=3Dexternal_links> > > 2016-06-24 7:49 GMT+02:00 Dan Hitt <[email protected]>: > >> I would like to have a widget, created in glade, that acts like a >> button in that it gets button-press-event, and has a stock image, but >> does not have any text label. >> >> A GtkToolButton almost fits the bill, in that it has an image but no tex= t. >> >> However, if you put signal handlers on a GtkToolButton, you can see >> when it is clicked, or gets a button-released-event, but the >> button-pressed-events are unreliable. In my setup, they only show up >> for double clicks. >> >> On the other hand a GtkButton certainly does get button-pressed-event >> and button-released-event, but if it's a stock button, there does not >> seem to be a way to tell it to just not show any text. >> >> I would like to do this entirely in glade, without writing any code, >> and using only standard images. >> >> Is this possible? >> >> I'm using xubuntu 16.04, and the glade which comes with it which is >> 3.18.3. >> >> Thanks in advance for any clues, and i can provide more details if i'm >> leaving something out here. >> >> dan >> _______________________________________________ >> Glade-users maillist - [email protected] >> http://lists.ximian.com/mailman/listinfo/glade-users >> > > --001a114b0cfa1ec5c7053607c430 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable <p dir=3D"ltr">Add a GtkButton, and inside a GtkImage. If you are using the= Glade UI, you have to check the =E2=80=9CAdd custom content=E2=80=9D check= box in the button properties.</p> <p dir=3D"ltr">Best,<br> Gergely</p> <div class=3D"gmail_quot<blockquote class=3D" style=3D"margin:0 0 0 .8ex= ;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><div><d= iv>Thanks Gergely for your suggestion.<br><br></div>But how would i do that= entirely in glade, and using only stock images?<br><br></div>TIA for any i= nfo.<br><br></div>dan<br></div><div class=3D"gmail_extra"><br><div class=3D= "gmail_quote">On Fri, Jun 24, 2016 at 1:04 AM, Gergely Polonkai <span dir= =3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_blank">gerge= [email protected]</a>></span> wrote:<br><blockquote class=3D"gmail_quote" s= tyle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div= dir=3D"ltr">Hello,<div><br></div><div>how about you create a simple button= , and add an image inside? Buttons are containers, you can put anything ins= ide (even a button, but that doesn=E2=80=99t make much sense).</div><div><b= r></div><div>Best,</div><div>Gergely</div></div><div class=3D"gmail_extra">= <br clear=3D"all"><div><div data-smartmail=3D"gmail_signature"><div dir=3D"= ltr"><table style=3D"margin:0px;padding:0px;border:0px;outline:0px;font-siz= e:16px;font-family:proxima-nova-1,proxima-nova-2,Tahoma,Helvetica,Verdana,s= ans-serif;vertical-align:baseline;border-spacing:0px;color:rgb(51,51,51);li= ne-height:22.4px;text-align:center" border=3D"0" cellpadding=3D"0" cellspac= ing=3D"0"><tbody style=3D"margin:0px;padding:0px;border:0px;outline:0px;fon= t-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:base= line"><tr style=3D"margin:0px;padding:0px;border:0px;outline:0px;font-weigh= t:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><= td style=3D"padding:0px;border:0px;outline:0px;font-style:inherit;font-size= :0px;font-family:inherit;vertical-align:baseline;text-align:left;width:auto= ;height:20px">=C2=A0</td></tr><tr style=3D"margin:0px;padding:0px;border:0p= x;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;ve= rtical-align:baseline"><td style=3D"padding:0px;border:0px;outline:0px;font= -style:inherit;font-family:inherit;vertical-align:baseline;text-align:left;= width:auto"><div style=3D"margin:0px;padding:0px;border:0px;outline:0px;fon= t-weight:inherit;font-style:inherit;font-family:inherit;vertical-align:base= line;line-height:0"><a href=3D"https://about.me/gergely.polonkai?promo=3Dem= ail_sig&utm_source=3Demail_sig&utm_medium=3Demail_sig&utm_campa= ign=3Dexternal_links" style=3D"margin:0px;padding:0px;border:0px;outline:0p= x;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align= :baseline;color:rgb(43,130,173);text-decoration:none;display:inline-block" = target=3D"_blank"><table style=3D"margin:0px;padding:0px;border:0px;outline= :0px;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-al= ign:baseline;border-spacing:0px" border=3D"0" cellpadding=3D"0" cellspacing= =3D"0"><tbody style=3D"margin:0px;padding:0px;border:0px;outline:0px;font-w= eight:inherit;font-style:inherit;font-family:inherit;vertical-align:baselin= e"><tr style=3D"margin:0px;padding:0px;border:0px;outline:0px;font-weight:i= nherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><td = style=3D"padding:0px;border:0px;outline:0px;font-style:inherit;font-family:= inherit;vertical-align:top;width:auto;line-height:1" align=3D"left" valign= =3D"top"><div style=3D"margin:0px;padding:0px;border:0px;outline:0px;font-w= eight:bold;font-style:inherit;font-size:18px;font-family:proxima-nova-1,Pro= xima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline;line-height:1;= color:rgb(51,51,51)">Gergely Polonkai</div></td></tr><tr style=3D"margin:0p= x;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit= ;font-family:inherit;vertical-align:baseline"><td style=3D"padding:0px;bord= er:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-align:to= p;width:auto;line-height:1" align=3D"left" valign=3D"top"><div style=3D"mar= gin:3px 0px 0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font= -style:inherit;font-size:12px;font-family:proxima-nova-1,Proxima-Nova,Helve= tica,Arial,sans-serif;vertical-align:baseline"><img alt=3D"https://" style= =3D"margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-= style:inherit;font-family:inherit;vertical-align:baseline;display:block;wid= th:0px;min-height:0px;overflow:hidden" height=3D"0" width=3D"0">about.me/ge= rgely.polonkai</div></td></tr></tbody></table></a></div></td></tr><tr style= =3D"margin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-= style:inherit;font-family:inherit;vertical-align:baseline"><td style=3D"pad= ding:0px;border:0px;outline:0px;font-style:inherit;font-size:0px;font-famil= y:inherit;vertical-align:baseline;text-align:left;width:auto;height:20px"><= img src=3D"https://about.me/t/sig?u=3Dgergely.polonkai" style=3D"margin:0px= ;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;= font-family:inherit;vertical-align:baseline;overflow:hidden" height=3D"1" w= idth=3D"1"></td></tr></tbody></table></div></div></div> <br><div class=3D"gmail_quote"><div><div>2016-06-24 7:49 GMT+02:00 Dan Hitt= <span dir=3D"ltr"><<a href=3D"mailto:[email protected]" target=3D"_bla= nk">[email protected]</a>></span>:<br></div></div><blockquote class=3D"= gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-= left:1ex"><div><div>I would like to have a widget, created in glade, that a= cts like a<br> button in that it gets button-press-event, and has a stock image, but<br> does not have any text label.<br> <br> A GtkToolButton almost fits the bill, in that it has an image but no text.<= br> <br> However, if you put signal handlers on a GtkToolButton, you can see<br> when it is clicked, or gets a button-released-event, but the<br> button-pressed-events are unreliable.=C2=A0 =C2=A0In my setup, they only sh= ow up<br> for double clicks.<br> <br> On the other hand a GtkButton certainly does get button-pressed-event<br> and button-released-event, but if it's a stock button, there does not<b= r> seem to be a way to tell it to just not show any text.<br> <br> I would like to do this entirely in glade, without writing any code,<br> and using only standard images.<br> <br> Is this possible?<br> <br> I'm using xubuntu 16.04, and the glade which comes with it which is 3.1= 8.3.<br> <br> Thanks in advance for any clues, and i can provide more details if i'm<= br> leaving something out here.<br> <br> dan<br></div></div> _______________________________________________<br> Glade-users maillist=C2=A0 -=C2=A0 <a href=3D"mailto:[email protected]= an.com" target=3D"_blank">[email protected]</a><br> <a href=3D"http://lists.ximian.com/mailman/listinfo/glade-users" rel=3D"nor= eferrer" target=3D"_blank">http://lists.ximian.com/mailman/listinfo/glade-u= sers</a><br> </blockquote></div><br></div> </blockquote></div><br></div> </div> --001a114b0cfa1ec5c7053607c430-- --===============1202058324== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Glade-users maillist - [email protected] http://lists.ximian.com/mailman/listinfo/glade-users --===============1202058324==--