11import React , { useEffect , useCallback , useState , useRef } from 'react'
22import { ipcRenderer , webFrame } from 'electron'
33import { platform } from 'process'
4- import { Select , TextInput , Radio , AppShell , virtualColor , colorsTuple } from '@mantine/core'
4+ import { Select , TextInput , Radio , AppShell , virtualColor , colorsTuple , Button as ButtonMantine } from '@mantine/core'
55import { createTheme , MantineProvider } from '@mantine/core'
66import { ModalsProvider } from '@mantine/modals'
7- import { FocusStyleManager , Alert , Classes , Intent } from '@blueprintjs/core'
7+ import { FocusStyleManager , Alert , Classes , Intent , Button } from '@blueprintjs/core'
88import classNames from 'classnames'
99import { Provider , observer } from 'mobx-react'
1010import { Trans , useTranslation } from 'react-i18next'
@@ -30,6 +30,7 @@ import '@blueprintjs/core/lib/css/blueprint.css'
3030// import '@blueprintjs/icons/lib/css/blueprint-icons.css'
3131// import '@blueprintjs/popover2/lib/css/blueprint-popover2.css'
3232import '$src/css/main.css'
33+ import '$src/css/mantine-extensions.css'
3334// import '$src/css/windows.css'
3435// import '$src/css/scrollbars.css'
3536
@@ -40,13 +41,20 @@ import { PreviewDialog } from './dialogs/PreviewDialog'
4041
4142const theme = createTheme ( {
4243 colors : {
43- [ 'blue-dark' ] : colorsTuple ( '#293742' ) ,
44- [ 'blue-light' ] : colorsTuple ( '#ced9e080' ) ,
44+ [ 'blue-background-dark' ] : colorsTuple ( '#293742' ) ,
45+ [ 'blue-background-light' ] : colorsTuple ( '#ced9e080' ) ,
46+ [ 'gray-light' ] : colorsTuple ( '#4a5056' ) ,
47+ [ 'gray-dark' ] : colorsTuple ( '#eeeeee' ) ,
4548 background : virtualColor ( {
46- light : 'blue-light' ,
47- dark : 'blue-dark' ,
49+ light : 'blue-background- light' ,
50+ dark : 'blue-background- dark' ,
4851 name : 'background' ,
4952 } ) ,
53+ button : virtualColor ( {
54+ light : 'gray-light' ,
55+ dark : 'gray-dark' ,
56+ name : 'button' ,
57+ } ) ,
5058 } ,
5159 components : {
5260 Select : Select . extend ( {
@@ -64,6 +72,11 @@ const theme = createTheme({
6472 label : { paddingBottom : '.2rem' } ,
6573 } ,
6674 } ) ,
75+ Button : ButtonMantine . extend ( {
76+ styles : {
77+ inner : { justifyContent : 'left' } ,
78+ } ,
79+ } ) ,
6780 } ,
6881} )
6982
@@ -316,6 +329,7 @@ const App = observer(() => {
316329 < MantineProvider theme = { theme } forceColorScheme = { ( settingsState . isDarkModeActive && 'dark' ) || 'light' } >
317330 < ModalsProvider >
318331 < AppShell
332+ transitionDuration = { 0 }
319333 header = { { height : 50 } }
320334 navbar = { {
321335 width : 200 ,
@@ -356,10 +370,9 @@ const App = observer(() => {
356370 </ AppShell . Header >
357371 { /* <div onClickCapture={handleClick} onContextMenuCapture={handleClick} className={mainClass}> */ }
358372 < AppShell . Navbar >
359- { /* <LeftPanel hide={!isExplorer} /> */ }
360- Navbar :)
373+ < LeftPanel hide = { ! isExplorer } />
361374 </ AppShell . Navbar >
362- < AppShell . Main h = "100%" flex = { 1 } >
375+ < AppShell . Main h = "100%" display = { 'flex' } >
363376 { < SideView viewState = { views [ 0 ] } hide = { ! isExplorer } /> }
364377 { splitView && < SideView viewState = { views [ 1 ] } hide = { ! isExplorer } /> }
365378 < Downloads hide = { isExplorer } />
0 commit comments