Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Highlight notebooks based on depth #1634

Merged
merged 3 commits into from
Jun 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ElectronClient/app/gui/SideBar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class SideBarComponent extends React.Component {
};
}

style() {
style(depth) {
const theme = themeStyle(this.props.theme);

const itemHeight = 25;
Expand All @@ -118,6 +118,8 @@ class SideBarComponent extends React.Component {
// paddingLeft: 14,
display: "flex",
alignItems: "stretch",
// Allow 3 levels of color depth
backgroundColor: theme.depthColor.replace('OPACITY', Math.min(depth * 0.1, 0.3)),
},
listItem: {
fontFamily: theme.fontFamily,
Expand Down Expand Up @@ -417,7 +419,7 @@ class SideBarComponent extends React.Component {

const itemTitle = Folder.displayTitle(folder);

let containerStyle = Object.assign({}, this.style().listItemContainer);
let containerStyle = Object.assign({}, this.style(depth).listItemContainer);
if (selected) containerStyle = Object.assign(containerStyle, this.style().listItemSelected);

let expandLinkStyle = Object.assign({}, this.style().listItemExpandIcon);
Expand Down
4 changes: 3 additions & 1 deletion ElectronClient/app/theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const lightStyle = {
urlColor: '#155BDA',

backgroundColor2: "#162B3D",
depthColor: 'rgb(100, 182, 253, OPACITY)',
color2: "#f5f5f5",
selectedColor2: "#0269C2",
colorError2: "#ff6c6c",
Expand Down Expand Up @@ -119,8 +120,9 @@ const darkStyle = {
urlColor: '#4E87EE',

backgroundColor2: "#181A1D",
depthColor: 'rgb(200, 200, 200, OPACITY)',
color2: "#ffffff",
selectedColor2: "#333333",
selectedColor2: "#013F74",
colorError2: "#ff6c6c",

raisedBackgroundColor: "#474747",
Expand Down