Skip to content

Commit

Permalink
More Squeak 6.0 support and some UI clean-up
Browse files Browse the repository at this point in the history
  • Loading branch information
marceltaeumel committed Oct 25, 2022
1 parent f946b00 commit a165fd4
Show file tree
Hide file tree
Showing 36 changed files with 90 additions and 198 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
constants
defaultExtent

^ 800@600
^ 670@500
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ buildBrowseButtonWith: aBuilder
enabled: #isProjectChapter;
action: #browseProject;
frame: (LayoutFrame new
leftFraction: 0.5 offset: 0;
topFraction: 0.25 offset: 0;
leftFraction: 0.38 offset: 0;
topFraction: 0.38 offset: ToolBuilder default buttonRowHeight negated;
rightFraction: 1 offset: 0;
bottomFraction: 0.3 offset: 0)
bottomFraction: 0.38 offset: 0)
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ buildChapterListWith: aBuilder
frame: (LayoutFrame new
leftFraction: 0;
topFraction: 0;
rightFraction: 0.5;
rightFraction: 0.38;
bottomFraction: 1)
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ buildDescriptionBoxWith: aBuilder
getText: #descriptionBoxContent;
readOnly: true;
indicateUnacceptedChanges: false;
padding: 23 pt @ 18 pt;
textStyle: TextStyle default copy centered;
frame: (LayoutFrame new
leftFraction: 0.5;
leftFraction: 0.38;
topFraction: 0;
rightFraction: 1;
bottomFraction: 0.25)
bottomFraction: 0.38 offset: ToolBuilder default buttonRowHeight negated)
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ buildKoanListWith: aBuilder
list: #koanList;
autoDeselect: false;
frame: (LayoutFrame new
leftFraction: 0.5;
topFraction: 0.3;
leftFraction: 0.38;
topFraction: 0.38;
rightFraction: 1;
bottomFraction: 1)
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
accessing
selectedChapter: anObject

selectedChapter := anObject
selectedChapter = anObject ifTrue: [^ self].
selectedChapter := anObject.
self changed: #selectedChapter.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
accessing
selectedKoan: aKoan

selectedKoan := aKoan
selectedKoan = aKoan ifTrue: [^ self].
selectedKoan := aKoan.
self changed: #selectedKoan.
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
ui
welcomeMessage

^ '
Welcome to the Koans. If you want to proceed
on your path to enlightenment choose a chapter
(on the left) to meditate on.'
^ 'Welcome to the Koans. If you want to proceed on your path to enlightenment choose a chapter (on the left) to meditate on.'
16 changes: 8 additions & 8 deletions src/Koans-Core.package/KoanBrowser.class/methodProperties.json
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"class" : {
"defaultExtent" : "SL 6/20/2017 22:41",
"defaultExtent" : "mt 10/25/2022 15:20",
"defaultLabel" : "SL 6/20/2017 22:41",
"open" : "mt 10/12/2017 11:05" },
"instance" : {
"addModelItemsToWindowMenu:" : "rhi 10/12/2017 12:03",
"browseProject" : "PG 7/13/2017 11:59",
"buildBrowseButtonWith:" : "rhi 10/12/2017 12:04",
"buildChapterListWith:" : "rhi 10/12/2017 12:04",
"buildDescriptionBoxWith:" : "rhi 10/12/2017 12:05",
"buildKoanListWith:" : "rhi 10/12/2017 12:05",
"buildBrowseButtonWith:" : "mt 10/25/2022 15:23",
"buildChapterListWith:" : "mt 10/25/2022 15:22",
"buildDescriptionBoxWith:" : "mt 10/25/2022 15:24",
"buildKoanListWith:" : "mt 10/25/2022 15:23",
"buildWith:" : "rhi 10/12/2017 12:07",
"changeToEditorViewOn:" : "rhi 10/12/2017 13:06",
"chapterDescriptionFor:" : "SL 7/12/2017 17:35",
Expand All @@ -26,9 +26,9 @@
"selectChapter:" : "rhi 10/12/2017 12:03",
"selectKoan:" : "SL 6/21/2017 00:36",
"selectedChapter" : "rhi 10/12/2017 12:02",
"selectedChapter:" : "rhi 10/12/2017 12:02",
"selectedChapter:" : "mt 10/25/2022 15:12",
"selectedKoan" : "PG 6/1/2017 16:03",
"selectedKoan:" : "PG 6/1/2017 16:02",
"selectedKoan:" : "mt 10/25/2022 15:12",
"tooltipFor:" : "pre 8/30/2021 16:57",
"welcomeMessage" : "PG 7/20/2017 13:36",
"welcomeMessage" : "mt 10/25/2022 15:07",
"windowColorToUse" : "ck 9/19/2018 10:39" } }
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
constants
buttonHeight

^ Preferences standardButtonFont height + 25
^ ToolBuilder default buttonRowHeight
4 changes: 0 additions & 4 deletions src/Koans-Core.package/KoanEditor.class/class/buttonWidth.st

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
constants
defaultExtent

^ 800@600
^ 670@500

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ buildBrowserWith: aBuilder
^ (self browser buildCodePaneWith: aBuilder)
frame: (LayoutFrame new
leftFraction: 0 offset: 0;
topFraction: 0 offset: self statusBarHeight - self class defaultOffset;
topFraction: 0 offset: self statusBarHeight ;
rightFraction: 1 offset: 0;
bottomFraction: 1 offset: self class buttonHeight negated + self class defaultOffset);
bottomFraction: 1 offset: self class buttonHeight negated);
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
building
buildButtonBarWith: aBuilder

| panelSpec |
panelSpec := aBuilder pluggablePanelSpec new.
panelSpec
layout: #horizontal;
children: OrderedCollection new;
frame: (LayoutFrame
fractions: (0@1 corner: 1@1)
offsets: (0@ self class buttonHeight negated corner: 0@0)).

self buttonSpecs do: [:spec | panelSpec children add: (
spec
ifNil: [aBuilder pluggableSpacerSpec new]
ifNotNil: [ | label action enabled help |
label := spec first.
action := spec second.
enabled := spec third.
help := spec fourth.
aBuilder pluggableButtonSpec new
model: self;
label: label;
action: action;
enabled: enabled;
help: help;
yourself])].

^panelSpec

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,5 @@ buildWith: aBuilder
children: {
self buildStatusBarWith: aBuilder.
self buildBrowserWith: aBuilder.
self buildNextButtonWith: aBuilder.
self buildTestButtonWith: aBuilder.
self buildPreviousButtonWith: aBuilder.
self buildResetKoanButtonWith: aBuilder.
self buildDebugButtonWith: aBuilder.
self buildBrowseProjectButtonWith: aBuilder.
self buildBackToSelectionViewButtonWith: aBuilder};
self buildButtonBarWith: aBuilder };
yourself)
14 changes: 14 additions & 0 deletions src/Koans-Core.package/KoanEditor.class/instance/buttonSpecs.st
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
building
buttonSpecs

^ #(
('Overview' changeToSelectionView nil 'Go back to overview')
nil
('Browse Project' browseProject isBrowseProjectButtonEnabled 'Browse Koans Project')
('Debug' debugKoan nil 'Debug this Koan')
('Reset Koan' resetKoan nil 'Reset code an try again')
nil
('Previous' previousKoan isPreviousButtonEnabled 'Go back to previous Koan')
('Test' saveAndTest nil 'Save edits and test Koan')
('Next' nextKoan isNextButtonEnabled 'Proceed to next Koan')
)
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
statusbar
statusBarHeight

^ 100
^ ToolBuilder default inputFieldHeight
21 changes: 7 additions & 14 deletions src/Koans-Core.package/KoanEditor.class/methodProperties.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
{
"class" : {
"buttonHeight" : "PG 8/4/2017 16:39",
"buttonWidth" : "PG 8/4/2017 16:39",
"defaultExtent" : "SL 6/21/2017 00:16",
"defaultOffset" : "PG 8/4/2017 16:28",
"buttonHeight" : "mt 10/25/2022 14:28",
"defaultExtent" : "mt 10/25/2022 15:20",
"defaultWindowTitle" : "SL 7/14/2017 21:24",
"newOnKoan:" : "mt 10/12/2017 11:03",
"openOn:" : "mt 10/12/2017 11:03",
Expand All @@ -14,16 +12,11 @@
"browseProject" : "SL 7/22/2017 21:49",
"browser" : "rhi 10/12/2017 12:12",
"browser:" : "rhi 10/12/2017 12:12",
"buildBackToSelectionViewButtonWith:" : "rhi 10/12/2017 12:14",
"buildBrowseProjectButtonWith:" : "rhi 10/12/2017 12:14",
"buildBrowserWith:" : "rhi 10/12/2017 12:15",
"buildDebugButtonWith:" : "rhi 10/12/2017 12:17",
"buildNextButtonWith:" : "rhi 10/12/2017 12:16",
"buildPreviousButtonWith:" : "rhi 10/12/2017 12:17",
"buildResetKoanButtonWith:" : "rhi 10/12/2017 12:16",
"buildBrowserWith:" : "mt 10/25/2022 14:29",
"buildButtonBarWith:" : "mt 10/25/2022 14:47",
"buildStatusBarWith:" : "rhi 10/12/2017 12:17",
"buildTestButtonWith:" : "rhi 10/12/2017 12:18",
"buildWith:" : "rhi 10/12/2017 12:19",
"buildWith:" : "mt 10/25/2022 14:41",
"buttonSpecs" : "mt 10/25/2022 14:40",
"changeToSelectionView" : "rhi 10/12/2017 13:07",
"closeOpenedWindow" : "PG 7/13/2017 12:27",
"debugKoan" : "SL 6/28/2017 18:48",
Expand All @@ -50,7 +43,7 @@
"saveChanges" : "rhi 10/12/2017 12:23",
"setBrowserTo:" : "SL 6/21/2017 00:13",
"statusBarBackgroundColor" : "pre 11/5/2018 08:43",
"statusBarHeight" : "ek 10/22/2022 15:31",
"statusBarHeight" : "mt 10/25/2022 14:28",
"statusBarText" : "pre 11/6/2018 11:10",
"statusBarTextColor" : "pre 11/6/2018 11:10",
"successMessage" : "SL 7/15/2017 19:12",
Expand Down
1 change: 1 addition & 0 deletions src/Koans-Tests.package/.squot-contents
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
SquotTrackedObjectMetadata {
#objectClassName : #PackageInfo,
#objectsReplacedByNames : true,
#serializer : #SquotCypressCodeSerializer
}

This file was deleted.

This file was deleted.

Loading

0 comments on commit a165fd4

Please sign in to comment.