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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dark Mode 馃帀 #644

Merged
merged 27 commits into from
Jul 8, 2019
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
91811b7
Add dark mode styles to the preferences window
karaggeorge Mar 10, 2019
b892184
Add dark mode to exports window
karaggeorge Mar 10, 2019
bf24285
Add vibrancy to the editor
karaggeorge Mar 10, 2019
400264c
Aadd dark mode support to the about window
karaggeorge Mar 10, 2019
862baca
Add dark mode support to the config page
karaggeorge Mar 10, 2019
4ee9716
Add dark mode support to the cropper
karaggeorge Mar 10, 2019
f50bd19
Update yarn lock
karaggeorge Mar 10, 2019
3939983
Merge remote-tracking branch 'origin/master' into dark-mode
karaggeorge Mar 10, 2019
82f46c0
Small fixes and make kap-blue a bit lighter for dark mode
karaggeorge Mar 10, 2019
c9d11bf
Add dark mode version to the editor slider
karaggeorge Mar 10, 2019
0f4a583
Merge remote-tracking branch 'origin/master' into dark-mode
karaggeorge Mar 16, 2019
d6b9853
Fix color
karaggeorge Mar 16, 2019
d59539f
Merge remote-tracking branch 'origin/master' into dark-mode
karaggeorge Apr 27, 2019
9e29b43
Editor style updates
karaggeorge Apr 27, 2019
4a8f200
Preferences updates
karaggeorge Apr 27, 2019
5c4328e
Merge master
karaggeorge May 14, 2019
6df95d2
Style config window
karaggeorge May 14, 2019
56ed155
Merge remote-tracking branch 'origin/master' into dark-mode
karaggeorge Jun 30, 2019
5fc65bc
Give the cropper an initial size (#671)
masquel Jul 3, 2019
0e49787
Fix editor controls (#683)
karaggeorge Jul 6, 2019
8ad8e52
Fix record button dark mode colors
karaggeorge Jul 7, 2019
1967aa4
Fix advanced controls styles
karaggeorge Jul 7, 2019
9e57660
Enable scroll bar flag
karaggeorge Jul 7, 2019
1e943a1
Fix settings colors
karaggeorge Jul 7, 2019
730903d
Switch the link color in the about windows
karaggeorge Jul 8, 2019
0df48af
Fix config button color
karaggeorge Jul 8, 2019
a408b9f
Merge remote-tracking branch 'origin/master' into dark-mode
karaggeorge Jul 8, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions main/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,13 @@ const openEditorWindow = async (filePath, {recordedFps, isNewRecording, original
minHeight: MIN_WINDOW_HEIGHT,
width: MIN_VIDEO_WIDTH,
height: MIN_WINDOW_HEIGHT,
frame: false,
webPreferences: {
nodeIntegration: true,
webSecurity: !is.development // Disable webSecurity in dev to load video over file:// protocol while serving over insecure http, this is not needed in production where we use file:// protocol for html serving.
},
frame: false,
transparent: true,
vibrancy: 'dark',
show: false
});

Expand All @@ -68,12 +69,14 @@ const openEditorWindow = async (filePath, {recordedFps, isNewRecording, original

if (buttonIndex === 1) {
event.preventDefault();
} else {
editors.delete(filePath);
}
});
}

editorWindow.on('closed', () => {
editors.delete(filePath);
});

editorWindow.on('blur', () => {
editorEmitter.emit('blur');
ipc.callRenderer(editorWindow, 'blur');
Expand Down
3 changes: 3 additions & 0 deletions main/exports.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ const openExportsWindow = async () => {
fullscreenable: false,
titleBarStyle: 'hiddenInset',
show: false,
frame: false,
transparent: true,
vibrancy: 'ultra-dark',
webPreferences: {
nodeIntegration: true
}
Expand Down
2 changes: 2 additions & 0 deletions main/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ require('./utils/sentry');

const filesToOpen = [];

app.commandLine.appendSwitch('--enable-features', 'OverlayScrollbar');

app.on('open-file', (event, path) => {
event.preventDefault();

Expand Down
3 changes: 3 additions & 0 deletions main/preferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ const openPrefsWindow = async () => {
fullscreenable: false,
titleBarStyle: 'hiddenInset',
show: false,
frame: false,
transparent: true,
vibrancy: 'ultra-dark',
webPreferences: {
nodeIntegration: true
}
Expand Down
30 changes: 19 additions & 11 deletions renderer/components/action-bar/controls/advanced.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ const advancedStyles = css`

const {className: keyboardInputClass, styles: keyboardInputStyles} = css.resolve`
height: 32px;
border: 1px solid #ddd;
background: white;
border: 1px solid var(--input-border-color);
background: var(--input-background-color);
color: var(--title-color);
text-align: left;
font-size: 12px;
transition: border 0.12s ease-in-out;
Expand All @@ -48,7 +49,11 @@ const {className: keyboardInputClass, styles: keyboardInputStyles} = css.resolve

:focus {
outline: none;
border: 1px solid #007aff;
border: 1px solid var(--input-focus-border-color);
}

:hover {
border-color: var(--input-hover-border-color);
}
`;

Expand Down Expand Up @@ -118,7 +123,9 @@ class Left extends React.Component {
}

.select {
border: 1px solid #dbdbdb;
border: 1px solid var(--input-border-color);
background: var(--input-background-color);
color: var(--title-color);
border-radius: 4px;
font-size: 0.7rem;
width: 96px;
Expand All @@ -133,7 +140,7 @@ class Left extends React.Component {

.select:focus {
outline: none;
border: 1px solid #007aff;
border: 1px solid var(--input-focus-border-color);
}

.select span {
Expand All @@ -143,22 +150,22 @@ class Left extends React.Component {
}

.select:hover {
border-color: #ccc;
border-color: var(--input-hover-border-color);
}

.link {
width: 32px;
height: 32px;
padding: 3px 3px;
box-sizing: border-box;
background: ${ratioLocked ? '#f7f7f7' : 'transparent'};
border: 1px solid #dbdbdb;
background: ${ratioLocked ? 'var(--button-active-color)' : 'var(--cropper-button-background-color)'};
border: 1px solid var(--input-border-color);
border-radius: 4px;
}

.link:focus {
outline: none;
border: 1px solid #007aff;
border: 1px solid var(--input-focus-border-color);
}
`}</style>
</div>
Expand Down Expand Up @@ -283,15 +290,16 @@ class Right extends React.Component {
width: 32px;
height: 32px;
padding: 3px 3px;
background: var(--cropper-button-background-color);
box-sizing: border-box;
border: 1px solid #dbdbdb;
border: 1px solid var(--input-border-color);
border-radius: 4px;
margin-right: 8px;
}

.swap:focus {
outline: none;
border: 1px solid #007aff;
border: 1px solid var(--input-focus-border-color);
}
`}</style>
</div>
Expand Down
5 changes: 3 additions & 2 deletions renderer/components/action-bar/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,10 @@ class ActionBar extends React.Component {
position: fixed;
height: ${height}px;
width: ${width}px;
background: white;
background: var(--action-bar-background);
border: var(--action-bar-border);
border-radius: 4px;
box-shadow: 0 20px 40px 0 rgba(0, 0, 0, .2);
box-shadow: var(--action-bar-box-shadow);
z-index: 10;
top: ${y}px;
left: ${x}px;
Expand Down
20 changes: 11 additions & 9 deletions renderer/components/action-bar/record-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ class RecordButton extends React.Component {
height: 48px;
padding: 8px;
border-radius: 50%;
background: #ff6059 radial-gradient(ellipse 100% 0% at 50% 0%, #ff6159 0%, #ff5f52 50%, #ff3a30 100%);
border: 2px solid #ff3b30;
background: var(--record-button-background);
border: 2px solid var(--record-button-border-color);
display: flex;
align-items: center;
justify-content: center;
Expand All @@ -142,22 +142,23 @@ class RecordButton extends React.Component {
width: 24px;
height: 24px;
border-radius: 50%;
background: #fff;
background: var(--record-button-inner-background${cropperExists ? '-cropper' : ''});
${cropperExists ? '' : 'border: var(--record-button-inner-border-width) solid var(--record-button-inner-border);'}
box-sizing: border-box;
}

.fill {
width: 20px;
height: 20px;
border-radius: 50%;
background: #ff6059 radial-gradient(ellipse 100% 0% at 50% 0%, #ff6159 0%, #ff5f52 50%, #ff3a30 100%);
background: var(--record-button-fill-background);
margin: 2px;
}

.ripple {
box-sizing: border-box;
border-radius: 50%;
border: 1px solid #ff5e57;
border: 1px solid var(--record-button-ripple-color);
background: transparent;
position: absolute;
width: 100%;
Expand All @@ -173,16 +174,17 @@ class RecordButton extends React.Component {
}

.container.cropper-exists:focus .outer {
background: #fff;
border: 2px solid var(--record-button-focus-outter-border);
background: var(--record-button-focus-outter-background);
}

.container.cropper-exists:focus .inner {
border: 2px solid #ff3b30;
background: radial-gradient(ellipse 100% 0% at 50% 0%, #ff6159 0%, #ff5f52 50%, #ff3a30 100%);
border-color: var(--record-button-border-color);
background: var(--record-button-focus-background${cropperExists ? '-cropper' : ''});
}

.container.cropper-exists:focus .fill {
background: #fff;
background: var(--record-button-fill-background);
}

@keyframes ripple {
Expand Down
9 changes: 5 additions & 4 deletions renderer/components/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class Config extends React.Component {
justify-content: center;
padding-bottom: 2px;
font-size: 1.2rem;
color: #007aff;
color: var(--kap);
font-weight: 500;
width: 64px;
}
Expand All @@ -101,7 +101,7 @@ class Config extends React.Component {
}

.service-nav .selected {
border-bottom: 2px solid #007aff;
border-bottom: 2px solid var(--kap);
padding-bottom: 0;
}

Expand Down Expand Up @@ -131,7 +131,7 @@ class Config extends React.Component {

footer .fade {
position: absolute;
background: linear-gradient(-180deg, rgba(255,255,255,0) 0%, #fff 100%);
background: linear-gradient(-180deg, rgba(255,255,255,0) 0%, var(--background-color) 100%);
width: 100%;
height: 16px;
top: 0;
Expand All @@ -142,14 +142,15 @@ class Config extends React.Component {
height: 32px;
line-height: 16px;
margin: 0 16px 16px 16px;
background: #007aff;
background: var(--kap);
border-radius: 3px;
color: #fff;
display: flex;
align-items: center;
justify-content: center;
flex: 1;
outline: none;
border: none;
}
`}</style>
</div>
Expand Down
11 changes: 7 additions & 4 deletions renderer/components/config/tab.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ const ConfigInput = ({name, type, schema, value, onChange, hasErrors}) => {
input {
outline: none;
width: 100%;
border: 1px solid #ddd;
border: 1px solid var(--input-border-color);
background: var(--input-background-color);
color: var(--title-color);
border-radius: 3px;
box-sizing: border-box;
height: 32px;
Expand All @@ -25,6 +27,7 @@ const ConfigInput = ({name, type, schema, value, onChange, hasErrors}) => {
font-size: 12px;
margin-top: 16px;
outline: none;
box-shadow: var(--input-shadow);
}

.has-errors {
Expand All @@ -33,7 +36,7 @@ const ConfigInput = ({name, type, schema, value, onChange, hasErrors}) => {
}

input:focus {
border-color: #007aff;
border-color: var(--kap);
}

div {
Expand Down Expand Up @@ -102,10 +105,10 @@ class Tab extends React.Component {
})
}
<Item subtitle="Open config file" onClick={openConfig}>
<div className="icon-container"><OpenConfigIcon fill="#007aff" hoverFill="#007aff" onClick={openConfig}/></div>
<div className="icon-container"><OpenConfigIcon fill="var(--kap)" hoverFill="var(--kap)" onClick={openConfig}/></div>
</Item>
<Item last subtitle="View plugin on GitHub" onClick={viewOnGithub}>
<div className="icon-container"><OpenOnGithubIcon size="20px" fill="#007aff" hoverFill="#007aff" onClick={viewOnGithub}/></div>
<div className="icon-container"><OpenOnGithubIcon size="20px" fill="var(--kap)" hoverFill="var(--kap)" onClick={viewOnGithub}/></div>
</Item>
<style jsx>{`
.container {
Expand Down
3 changes: 2 additions & 1 deletion renderer/components/editor/options/left.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import Slider from './slider';

const {className: keyboardInputClass, styles: keyboardInputStyles} = css.resolve`
height: 24px;
background: hsla(0, 0%, 100%, 0.1);
background: rgba(255, 255, 255, 0.1);
text-align: center;
font-size: 12px;
box-sizing: border-box;
Expand All @@ -17,6 +17,7 @@ const {className: keyboardInputClass, styles: keyboardInputStyles} = css.resolve
border-top-left-radius: 4px;
width: 48px;
color: white;
box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.04), 0px 1px 2px 0px rgba(0, 0, 0, 0.2);

input + input {
border-bottom-left-radius: 0;
Expand Down
3 changes: 2 additions & 1 deletion renderer/components/editor/options/right.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,15 @@ class RightOptions extends React.Component {

button {
padding: 4px 8px;
background: hsla(0, 0%, 100%, 0.1);
background: rgba(255, 255, 255, 0.1);
font-size: 12px;
color: white;
height: 24px;
border-radius: 4px;
text-align: center;
width: 72px;
border: none;
box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.04), 0px 1px 2px 0px rgba(0, 0, 0, 0.2);
}

button:hover,
Expand Down
3 changes: 2 additions & 1 deletion renderer/components/editor/options/select.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,11 @@ class Select extends React.Component {
left: 0;
width: 100%;
height: 100%;
background: hsla(0, 0%, 100%, 0.1);
background: rgba(255, 255, 255, 0.1);
border: none;
outline: none;
color: transparent;
box-shadow: inset 0px 1px 0px 0px rgba(255, 255, 255, 0.04), 0px 1px 2px 0px rgba(0, 0, 0, 0.2);
}

select:hover,
Expand Down