Skip to content

Commit

Permalink
Merge pull request #123 from atom-community/remove-glow
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya authored Feb 27, 2021
2 parents 1587dab + 3a56420 commit e8ff36b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 19 deletions.
6 changes: 0 additions & 6 deletions lib/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,5 @@
"description": "The time that the mouse/cursor should hover/stay to show a datatip. Also specifies the time that the datatip is still shown when the mouse/cursor moves [ms].",
"type": "number",
"default": 100
},
"glowOnHover": {
"title": "Glow on hover",
"description": "Should the datatip glow when you hover on it?",
"type": "boolean",
"default": true
}
}
7 changes: 2 additions & 5 deletions lib/datatip-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ export class DataTipManager {
/** The time that the mouse/cursor should hover/stay to show a datatip. Also specifies the time that the datatip is still shown when the mouse/cursor moves [ms]. */
hoverTime = atom.config.get("atom-ide-datatip.hoverTime")

// glow on hover
glowClass = atom.config.get("atom-ide-datatip.glowOnHover") ? "datatip-glow" : ""

constructor() {
/**
* the mouse move event handler that evaluates the screen position and eventually shows a data tip
Expand Down Expand Up @@ -371,7 +368,7 @@ export class DataTipManager {
containerClassName: "datatip-component-container",
contentClassName: "datatip-component",
},
className: `datatip-element select-list popover-list ${this.glowClass}`,
className: "datatip-element select-list popover-list",
})
this.dataTipMarkerDisposables = this.mountDataTipWithMarker(editor, datatip.range, position, dataTipView)
} else if (datatip.markedStrings.length > 0) {
Expand Down Expand Up @@ -409,7 +406,7 @@ export class DataTipManager {
const dataTipView = new ViewContainer({
snippet,
markdown,
className: `datatip-element select-list popover-list ${this.glowClass}`,
className: "datatip-element select-list popover-list",
})

this.dataTipMarkerDisposables = this.mountDataTipWithMarker(editor, datatip.range, position, dataTipView)
Expand Down
14 changes: 6 additions & 8 deletions styles/atom-ide-datatips.less
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,16 @@
width: auto;
}

.datatip-element.datatip-glow {
// glow on hover
transition: background-color 0.15s ease;
&:hover {
background-color: mix(@syntax-background-color, @syntax-selection-color, 95%);
}
}

.datatip-overlay {
// info border
border-bottom: 5px solid @background-color-highlight;
border-radius: 3px;

// info bar glow
transition: border-bottom-color 0.15s ease;
&:hover {
border-bottom-color: lighten(@background-color-highlight, 10%);
}
}

/** Applied to ReactView (Components) */
Expand Down

0 comments on commit e8ff36b

Please sign in to comment.