In smalltalk tools use same background in lists as in code view. jv
authorJan Vrany <jan.vrany@fit.cvut.cz>
Thu, 11 Oct 2018 14:14:49 +0200
branchjv
changeset 18446 84498b441bc0
parent 18445 73c795373547
child 18532 cccb41254edf
In smalltalk tools use same background in lists as in code view. The idea is to make tools to look more consistent. Future will show if this is a usefull idea or not.
DebugView.st
InspectorView.st
NewLauncher.st
Tools__BrowserList.st
--- a/DebugView.st	Fri Sep 28 10:18:00 2018 +0100
+++ b/DebugView.st	Thu Oct 11 14:14:49 2018 +0200
@@ -37,12 +37,12 @@
 		classToDefineIn gotoApplicationActionMethodButton
 		isStoppedInApplicationAction isStoppedAtStatementBreakpoint
 		verboseBacktraceHolder keyboardMap'
-	classVariableNames:'CachedDebugger CachedExclusive OpenDebuggers MoreDebuggingDetail
-		DebuggingDebugger DebuggingDebugger2 DebuggingContextWalk
-		DefaultDebuggerBackgroundColor InitialNChainShown IgnoredHalts
-		ShowThreadID LastIgnoreHaltNTimes LastIgnoreHaltDuration
-		LastExtent LastOrigin RememberedCallChain DebuggingDebugger3
-		NumberOfDebuggers DebuggerOnMainDisplayOnly'
+	classVariableNames:'CachedDebugger CachedExclusive DebuggerOnMainDisplayOnly
+		DebuggingContextWalk DebuggingDebugger DebuggingDebugger2
+		DebuggingDebugger3 DefaultDebuggerBackgroundColor IgnoredHalts
+		InitialNChainShown LastExtent LastIgnoreHaltDuration
+		LastIgnoreHaltNTimes LastOrigin MoreDebuggingDetail
+		NumberOfDebuggers OpenDebuggers RememberedCallChain ShowThreadID'
 	poolDictionaries:''
 	category:'Interface-Debugger'
 !
@@ -3626,7 +3626,7 @@
 !
 
 initializeContextListViewIn:panel
-    |v|
+    | v codeViewTheme |
 
     v := HVScrollableView
                 for:SelectionInListView
@@ -3642,7 +3642,23 @@
 
     contextView middleButtonMenu:(self middleButtonMenu).
 
+    "/ EXPERIMENTAL:
+    "/ 
+    "/ To make tools look more consistent, use same background color
+    "/ as code editor's background.
+    codeViewTheme := UserPreferences current codeViewTheme.
+    codeViewTheme notNil ifTrue:[ 
+        | background |
+
+        background := codeViewTheme defaultSyntaxBackground.
+        background notNil ifTrue:[
+            contextView backgroundChannel: background
+        ]
+    ].      
+
     ^ v
+
+    "Modified: / 11-10-2018 / 11:40:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 initializeContextViewsMiddleButtonMenu
--- a/InspectorView.st	Fri Sep 28 10:18:00 2018 +0100
+++ b/InspectorView.st	Thu Oct 11 14:14:49 2018 +0200
@@ -1713,7 +1713,7 @@
 !
 
 initialize
-    |v panel helpView labelView2|
+    |v panel helpView labelView2 codeViewTheme |
 
     super initialize.
 
@@ -1759,6 +1759,21 @@
     listView doubleClickAction:[:lineNr | self doubleClickOnLine:lineNr].
     listView ignoreReselect:false.
     listView menuHolder:self; menuPerformer:self; menuMessage:#fieldMenu.
+
+    "/ EXPERIMENTAL:
+    "/ 
+    "/ To make tools look more consistent, use same background color
+    "/ as code editor's background.
+    codeViewTheme := UserPreferences current codeViewTheme.
+    codeViewTheme notNil ifTrue:[ 
+        | background |
+
+        background := codeViewTheme defaultSyntaxBackground.
+        background notNil ifTrue:[
+            listView backgroundChannel: background
+        ]
+    ].    
+
     self initializeDragAndDrop.
 
     helpView := View origin:(0.3 @ 0.0) corner:(1.0 @ 1.0) in:panel.
@@ -1790,6 +1805,7 @@
 
     "Modified: / 16-08-2005 / 21:54:04 / janfrog"
     "Modified: / 20-07-2012 / 10:48:34 / cg"
+    "Modified: / 11-10-2018 / 11:41:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 initializeDragAndDrop
@@ -4314,6 +4330,11 @@
 
 version_CVS
     ^ '$Header$'
+!
+
+version_HG
+
+    ^ '$Changeset: <not expanded> $'
 ! !
 
 
--- a/NewLauncher.st	Fri Sep 28 10:18:00 2018 +0100
+++ b/NewLauncher.st	Thu Oct 11 14:14:49 2018 +0200
@@ -3497,13 +3497,30 @@
     "provide access to my transcript view"
 
     transcript isNil ifTrue:[
-	(self componentAt: #transcriptView) notNil ifTrue:[
-	    transcript := (self componentAt: #transcriptView) subViews first.
-	] ifFalse:[
-	    transcript := Workspace new.
-	]
+        | codeViewTheme |
+
+        (self componentAt: #transcriptView) notNil ifTrue:[
+            transcript := (self componentAt: #transcriptView) subViews first.
+        ] ifFalse:[
+            transcript := Workspace new.
+        ].
+        "/ EXPERIMENTAL:
+        "/ 
+        "/ To make tools look more consistent, use same background color
+        "/ as code editor's background.
+        codeViewTheme := UserPreferences current codeViewTheme.
+        codeViewTheme notNil ifTrue:[ 
+            | background |
+
+            background := codeViewTheme defaultSyntaxBackground.
+            background notNil ifTrue:[
+                transcript backgroundChannel: background
+            ]
+        ].                         
     ].
     ^ transcript
+
+    "Modified: / 11-10-2018 / 14:10:38 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !NewLauncher methodsFor:'aspects'!
--- a/Tools__BrowserList.st	Fri Sep 28 10:18:00 2018 +0100
+++ b/Tools__BrowserList.st	Thu Oct 11 14:14:49 2018 +0200
@@ -1287,8 +1287,26 @@
 
     list := builder componentAt:#List.
     list notNil ifTrue:[
+        | codeViewTheme |
+
         list selectConditionBlock:[:item | self selectionChangeAllowed].
         list ignoreReselect:false.
+
+        "/ EXPERIMENTAL:
+        "/ 
+        "/ To make tools look more consistent, use same background color
+        "/ as code editor's background. But do so only if the list is
+        "/ past of the browser it.
+        codeViewTheme := UserPreferences current codeViewTheme.
+        (codeViewTheme notNil and:[list topView application isKindOf: NewSystemBrowser]) ifTrue:[ 
+            | background |
+
+            background := codeViewTheme defaultSyntaxBackground.
+            background notNil ifTrue:[
+                list scrolledView backgroundChannel: background
+            ]
+        ].
+
     ].
 
     UserPreferences current useInPlaceSearchInBrowserLists ifTrue:[
@@ -1301,7 +1319,7 @@
         ]
     ]
 
-    "Modified: / 28-07-2011 / 09:39:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified (comment): / 11-10-2018 / 11:36:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 commonPostOpen