Icon for debugger in the toolbar#16661
Conversation
|
The icons seem to have gone missing due to the changes in commit b25824e010604f57 and Spec commit 1e0ba07e672b77af: taskbarIconName
^ self presenter
ifNil: [ super taskbarIconName ]
ifNotNil: #taskbarIconNameNote that the change to |
|
Thanks for the explanation. Do you think |
|
I would suggest to maybe first fix the missing A change in commit 09f40b6 that is not so clear to me is the removal of the send of |
|
I try to do this in an image based on the code of
I agree that |
| "Answer the icon for the receiver in a task bar | ||
| or nil for the default." | ||
|
|
||
| ^self class taskbarIconName |
There was a problem hiding this comment.
This is only default formatting
|
I updated the code to use only iconName instead of icon and so to use a iconSetForm. |
|
So I imagine that now I can merge? |
|
@badetitou: Regarding your third comment, I’m not quite sure what you tried and why that wouldn’t have worked. Try implementing the following on SpWindowPresenter in Pharo 13 build 97: windowIconName
^ self windowIcon ifNotNil: [ :form |
Smalltalk ui icons icons keyAtValue: form ifAbsent: [ #notFound ] ]
taskbarIconName
^ self windowIconName ifNil: [
self presenter
ifNil: [ super taskbarIconName ]
ifNotNil: #taskbarIconName ]This implementation of One case in which this won’t work is the icon created in |
|
I opened a pull request to add the two icons to the icon pack: pharo-icon-packs pull request #13. |
In the past, we were use to have the icon of the window in the toolbar.
Issue summary
For instance, in Pharo 10, we had the icon for the debugger (see screenshot)

But, in Pharo12. we lose this icon (see second screenshot)

This PR aims to add it back as presented in the last screenshot

Fix detail
To fix the issue. I first discovered that
TaskbarItemMorphis created from aTaskbarTask, but the model ofTaskbarItemMorphis the actual window morph and not theTaskbarTaskobject. However, the window might not have all the correct information such as the correct icon. However, theTaskbarTaskhas a reference to the window morph, the label of theTaskbarItemMorph, the correct label, and the state of the window morph.So, I concluded that
TaskbarTaskis the perfect object for being the model of theTaskbarItemMorph. I thus modify the code to makeTaskbarTaskthe model ofTaskbarItemMorph.Then, I fixed the methods of
TaskbarTaskandTaskbarItemMorphin a way that they call the correct method and tada.On my computer, I have the correct icon, I have pre-visualisation of windows, and I can open/close windows. I also have the correct label color with minimized and maximized windows in the taskbar.
I do not know where to had tests for this kind of feature, but I can have a look if someone has idea (I dunno if it was tested)
fix #16594