diff options
author | 2018-02-20 16:10:00 +0100 | |
---|---|---|
committer | 2018-02-20 16:10:00 +0100 | |
commit | 08536e7e0a8995c0a94c363f6c230ec422c4671b (patch) | |
tree | b29658ba85e2ce868e1f04d960ba76affa3d3b17 | |
parent | choose platform with environment variable `FRANZ_PLATFORM` (diff) | |
download | ferdium-app-08536e7e0a8995c0a94c363f6c230ec422c4671b.tar.gz ferdium-app-08536e7e0a8995c0a94c363f6c230ec422c4671b.tar.zst ferdium-app-08536e7e0a8995c0a94c363f6c230ec422c4671b.zip |
fix CSS conflicts
override `reset.scss` with `title-bar.scss`
-rw-r--r-- | src/components/layout/AppLayout.js | 4 | ||||
-rw-r--r-- | src/index.js | 2 | ||||
-rw-r--r-- | src/lib/Menu.js | 2 | ||||
-rw-r--r-- | src/styles/main.scss | 2 | ||||
-rw-r--r-- | src/styles/title-bar.scss | 7 |
5 files changed, 12 insertions, 5 deletions
diff --git a/src/components/layout/AppLayout.js b/src/components/layout/AppLayout.js index 4f047368a..20fe61092 100644 --- a/src/components/layout/AppLayout.js +++ b/src/components/layout/AppLayout.js | |||
@@ -89,9 +89,7 @@ export default class AppLayout extends Component { | |||
89 | return ( | 89 | return ( |
90 | <div> | 90 | <div> |
91 | <div className="app"> | 91 | <div className="app"> |
92 | <TitleBar menu={window.franz.menu.template}> | 92 | <TitleBar menu={window.franz.menu.template} icon={'assets/images/logo.svg'} /> |
93 | <link rel="stylesheet" type="text/css" href={require.resolve('electron-react-titlebar/assets/style.css')} /> | ||
94 | </TitleBar> | ||
95 | <div className="app__content"> | 93 | <div className="app__content"> |
96 | {sidebar} | 94 | {sidebar} |
97 | <div className="app__service"> | 95 | <div className="app__service"> |
diff --git a/src/index.js b/src/index.js index f82bb3590..9ba6e0e43 100644 --- a/src/index.js +++ b/src/index.js | |||
@@ -72,7 +72,7 @@ const createWindow = () => { | |||
72 | height: mainWindowState.height, | 72 | height: mainWindowState.height, |
73 | minWidth: 600, | 73 | minWidth: 600, |
74 | minHeight: 500, | 74 | minHeight: 500, |
75 | titleBarStyle: 'hidden', | 75 | titleBarStyle: process.env.FRANZ_PLATFORM || process.platform === 'win32' ? '' : 'hidden', |
76 | backgroundColor: '#3498db', | 76 | backgroundColor: '#3498db', |
77 | autoHideMenuBar: true, | 77 | autoHideMenuBar: true, |
78 | }); | 78 | }); |
diff --git a/src/lib/Menu.js b/src/lib/Menu.js index 0818c94fb..75f2efbea 100644 --- a/src/lib/Menu.js +++ b/src/lib/Menu.js | |||
@@ -124,7 +124,7 @@ export default class FranzMenu { | |||
124 | autorun(this._build.bind(this)); | 124 | autorun(this._build.bind(this)); |
125 | } | 125 | } |
126 | 126 | ||
127 | get template() { | 127 | @computed get template() { |
128 | return toJS(this.tpl); | 128 | return toJS(this.tpl); |
129 | } | 129 | } |
130 | 130 | ||
diff --git a/src/styles/main.scss b/src/styles/main.scss index 446bdca14..388eb2f77 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss | |||
@@ -4,6 +4,7 @@ $mdi-font-path: '../node_modules/mdi/fonts'; | |||
4 | } | 4 | } |
5 | 5 | ||
6 | @import './node_modules/mdi/scss/materialdesignicons.scss'; | 6 | @import './node_modules/mdi/scss/materialdesignicons.scss'; |
7 | @import './node_modules/electron-react-titlebar/assets/style.scss'; | ||
7 | 8 | ||
8 | // modules | 9 | // modules |
9 | @import './reset.scss'; | 10 | @import './reset.scss'; |
@@ -28,6 +29,7 @@ $mdi-font-path: '../node_modules/mdi/fonts'; | |||
28 | @import './subscription-popup.scss'; | 29 | @import './subscription-popup.scss'; |
29 | @import './content-tabs.scss'; | 30 | @import './content-tabs.scss'; |
30 | @import './invite.scss'; | 31 | @import './invite.scss'; |
32 | @import './title-bar.scss'; | ||
31 | 33 | ||
32 | // form | 34 | // form |
33 | @import './input.scss'; | 35 | @import './input.scss'; |
diff --git a/src/styles/title-bar.scss b/src/styles/title-bar.scss new file mode 100644 index 000000000..67bf97008 --- /dev/null +++ b/src/styles/title-bar.scss | |||
@@ -0,0 +1,7 @@ | |||
1 | #electron-app-title-bar span { | ||
2 | line-height: normal; | ||
3 | } | ||
4 | |||
5 | #electron-app-title-bar div { | ||
6 | height: auto; | ||
7 | } | ||