1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-11-27 08:21:03 +02:00

Desktop: New: Highlight notebooks based on depth (#1634)

* Highlight notebooks based on depth

* Adjusted notebook depth targets, and dark theme select color
This commit is contained in:
Caleb John 2019-06-10 16:44:51 -06:00 committed by Laurent Cozic
parent 7535f1a8c6
commit 041bdc08a2
2 changed files with 7 additions and 3 deletions

View File

@ -103,7 +103,7 @@ class SideBarComponent extends React.Component {
};
}
style() {
style(depth) {
const theme = themeStyle(this.props.theme);
const itemHeight = 25;
@ -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,
@ -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);

View File

@ -82,6 +82,7 @@ const lightStyle = {
urlColor: '#155BDA',
backgroundColor2: "#162B3D",
depthColor: 'rgb(100, 182, 253, OPACITY)',
color2: "#f5f5f5",
selectedColor2: "#0269C2",
colorError2: "#ff6c6c",
@ -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",