<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
On 5/26/2025 5:49 PM, Hilaire Fernandes via Cuis-dev wrote:
<blockquote cite="mid:9d11cc7d-1c82-4450-87ca-b41ee09d7e35@free.fr"
type="cite">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<p><font size="4">Changing to use iconOnly: will be fine, but it
fells like a strange protocol to have both icon: and
iconOnly: </font></p>
<p><font size="4">My believing you should not have both, and if
icon only it should be guess automatically by the button</font><br>
</p>
<div class="moz-cite-prefix">Le 26/05/2025 à 22:17, Juan Vuletich
a écrit :<br>
</div>
<blockquote type="cite" cite="mid:6834CC4B.5030604@cuis.st">Your
code is OK, but it (unsurprisingly) it breaks the other use
case. I just pushed an update that integrates most of your code,
but adds a new method #iconOnly: to specify the icon, and that
nothing else should be drawn for this button. May I ask you to
change your senders to this new selector?<br>
</blockquote>
<pre class="moz-signature" cols="72">--
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://mamot.fr/@drgeo">http://mamot.fr/@drgeo</a></pre>
</blockquote>
<br>
Please evaluate all the code below on a Workspace in an updated Cuis
image.<br>
- You want the first button, where only the icon is shown<br>
- Other developers may want the second button, because they use it
together with the third button, and want them to look similar.<br>
<br>
The first button has icon and no button shape. The second has icon
and button shape. The third has label and button shape. The fourth
has only button shape. Someone may even want the fifth one.<br>
<br>
The code below shows a possible way to do all this. If you don't
like it, please post a similar example, covering all possibilities,
in the style you prefer. Then we can choose.<br>
<br>
Thanks,<br>
<br>
button := PluggableButtonMorph model: 42 action: #startGame ::<br>
enableSelector: #notNil;<br>
iconOnly: Theme current playIcon;<br>
borderWidth: 2;<br>
borderColor: Color black;<br>
setBalloonText: 'Play the game';<br>
morphExtent: 64 asPoint.<br>
button openInWorld; morphPosition: 80@80.<br>
<br>
button := PluggableButtonMorph model: 42 action: #startGame ::<br>
enableSelector: #notNil;<br>
icon: Theme current playIcon;<br>
borderWidth: 2;<br>
borderColor: Color black;<br>
setBalloonText: 'Play the game';<br>
morphExtent: 64 asPoint.<br>
button openInWorld; morphPosition: 160@80.<br>
<br>
button := PluggableButtonMorph model: 42 action: #startGame ::<br>
enableSelector: #notNil;<br>
label: '>';<br>
borderWidth: 2;<br>
borderColor: Color black;<br>
setBalloonText: 'Play the game';<br>
morphExtent: 64 asPoint.<br>
button openInWorld; morphPosition: 240@80.<br>
<br>
button := PluggableButtonMorph model: 42 action: #startGame ::<br>
enableSelector: #notNil;<br>
borderWidth: 2;<br>
borderColor: Color black;<br>
setBalloonText: 'Play the game';<br>
morphExtent: 64 asPoint.<br>
button openInWorld; morphPosition: 320@80.<br>
<br>
button := PluggableButtonMorph model: 42 action: #startGame ::<br>
enableSelector: #notNil;<br>
label: 'lalalalallalalalalaa';<br>
icon: Theme current playIcon;<br>
borderWidth: 2;<br>
borderColor: Color black;<br>
setBalloonText: 'Play the game';<br>
morphExtent: 200@64.<br>
button openInWorld; morphPosition: 400@80.<br>
<pre class="moz-signature" cols="72">--
Juan Vuletich
cuis.st
github.com/jvuletich
researchgate.net/profile/Juan-Vuletich
independent.academia.edu/JuanVuletich
patents.justia.com/inventor/juan-manuel-vuletich
linkedin.com/in/juan-vuletich-75611b3
twitter.com/JuanVuletich</pre>
</body>
</html>