In the current menu bar in Pharo 7 I miss launcher icons. This is a quick
ad-hoc tweak how to add them:



MenubarMorph reset.

World menubar submorphs second delete.

World menubar addMorph: (SimpleButtonMorph new
label: '|';
actionSelector: #value; color: Color transparent; borderWidth: 0; yourself)
after: World menubar submorphs first.

World menubar addMorph: (IconicButton new
target: [ Smalltalk saveSession ];
helpText: 'Save image';
labelGraphic: (self iconNamed: #smallSave);
actionSelector: #value; color: Color transparent; borderWidth: 0; yourself)
after: World menubar submorphs first.

World menubar addMorph: (SimpleButtonMorph new
label: '|';
actionSelector: #value; color: Color transparent; borderWidth: 0; yourself)
after: World menubar submorphs first.

World menubar addMorph: (IconicButton new
target: [ IceTipRepositoriesBrowser  new openWithSpec ];
helpText: 'Iceberg';
labelGraphic: (IceTipRepositoriesBrowser icon);
actionSelector: #value; color: Color transparent; borderWidth: 0; yourself)
after: World menubar submorphs first.
World menubar addMorph: (IconicButton new
target: [ Smalltalk tools openTestRunner ];
helpText: 'Test runner';
labelGraphic: ( self iconNamed: #testRunnerIcon);
actionSelector: #value; color: Color transparent; borderWidth: 0; yourself)
after: World menubar submorphs first.

World menubar addMorph: (IconicButton new
target: [ Smalltalk tools openWorkspace  ];
helpText: 'Playground';
labelGraphic: ( Smalltalk tools workspace taskbarIcon);
actionSelector: #value; color: Color transparent; borderWidth: 0; yourself)
after: World menubar submorphs first.
World menubar addMorph: (IconicButton new
target: [ Smalltalk tools browser open ];
helpText: 'System browser';
labelGraphic: (self iconNamed: #nautilus);
actionSelector: #value; color: Color transparent; borderWidth: 0; yourself)
after: World menubar submorphs first.

World menubar addMorph: (SimpleButtonMorph new
label: '|';
actionSelector: #value; color: Color transparent; borderWidth: 0; yourself)
after: World menubar submorphs first.

World menubar addMorphBack: (SimpleButtonMorph new
label: '|';
actionSelector: #value; color: Color transparent; borderWidth: 0; yourself).

World menubar addMorphBack: (IconicButton new
target: [ self inform: 'hello world' ];
helpText: 'custom action';
labelGraphic: (self iconNamed: #glamorousGo);
actionSelector: #value; color: Color transparent; borderWidth: 0; yourself).

Reply via email to