Browse Source

rename styles add jp variable styles

Borys Palka 5 years ago
parent
commit
c21d9ba799
4 changed files with 18 additions and 10 deletions
  1. 3 3
      src/debugger.ts
  2. 11 3
      src/handlers/cell.ts
  3. 1 1
      src/service.ts
  4. 3 3
      style/breakpoints.css

+ 3 - 3
src/debugger.ts

@@ -152,8 +152,8 @@ export namespace Debugger {
       this._codeValue = observableString;
     }
 
-    get selectCurrentLine() {
-      return this._selectCurrentLine;
+    get currentLineChanged() {
+      return this._currentLineChanged;
     }
 
     dispose(): void {
@@ -176,7 +176,7 @@ export namespace Debugger {
     private _session: IDebugger.ISession | null;
     private _sessionChanged = new Signal<this, void>(this);
     private _service = new DebugService(null, this);
-    private _selectCurrentLine = new Signal<this, number>(this);
+    private _currentLineChanged = new Signal<this, number>(this);
   }
 
   export namespace Model {

+ 11 - 3
src/handlers/cell.ts

@@ -30,7 +30,7 @@ export class CellManager implements IDisposable {
       this.clearGutter(this.activeCell);
     });
 
-    this._debuggerModel.selectCurrentLine.connect((_, lineNumber) => {
+    this._debuggerModel.currentLineChanged.connect((_, lineNumber) => {
       this.showCurrentLine(lineNumber);
     });
   }
@@ -47,9 +47,17 @@ export class CellManager implements IDisposable {
     if (this.activeCell) {
       const editor = this.activeCell.editor as CodeMirrorEditor;
       editor.doc.eachLine(line => {
-        editor.editor.removeLineClass(line, 'wrap', 'highlight');
+        editor.editor.removeLineClass(
+          line,
+          'wrap',
+          'jp-breakpoint-line-highlight'
+        );
       });
-      editor.editor.addLineClass(lineNumber - 1, 'wrap', 'highlight');
+      editor.editor.addLineClass(
+        lineNumber - 1,
+        'wrap',
+        'jp-breakpoint-line-highlight'
+      );
     }
   }
 

+ 1 - 1
src/service.ts

@@ -68,7 +68,7 @@ export class DebugService {
       });
       if (index === 0) {
         this._model.sidebar.variables.model.scopes = values;
-        this._model.selectCurrentLine.emit(frame.line);
+        this._model.currentLineChanged.emit(frame.line);
       }
     });
 

+ 3 - 3
style/breakpoints.css

@@ -11,9 +11,9 @@
   position: absolute;
   left: -35px;
   top: -1px;
-  color: #f22;
+  color: var(--jp-error-color1);
 }
 
-.highlight {
-  background-color: orange;
+.jp-breakpoint-line-highlight {
+  background-color: var(--jp-warn-color0);
 }