Skip to content

Commit 7ccc5eb

Browse files
author
Kazu Yokomizo
committed
Fix switch button layout
1 parent b4b6d3d commit 7ccc5eb

5 files changed

+75
-5
lines changed

browser/main/Detail/MarkdownNoteDetail.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -357,10 +357,10 @@ class MarkdownNoteDetail extends React.Component {
357357

358358
<div styleName='mode-tab'>
359359
<div styleName={editorType === 'SPLIT' ? 'active' : 'non-active'} onClick={() => this.handleSwitchMode('SPLIT')}>
360-
<img styleName='item-star' src='../resources/icon/icon-mode-split-on.svg' />
360+
<img styleName='item-star' src={editorType === 'EDITOR_PREVIEW' ? '../resources/icon/icon-mode-split-on.svg' : '../resources/icon/icon-mode-split-on-active.svg'} />
361361
</div>
362362
<div styleName={editorType === 'EDITOR_PREVIEW' ? 'active' : 'non-active'} onClick={() => this.handleSwitchMode('EDITOR_PREVIEW')}>
363-
<img styleName='item-star' src='../resources/icon/icon-mode-markdown-off.svg' />
363+
<img styleName='item-star' src={editorType === 'EDITOR_PREVIEW' ? '../resources/icon/icon-mode-markdown-off-active.svg' : '../resources/icon/icon-mode-markdown-off.svg'} />
364364
</div>
365365
</div>
366366

browser/main/Detail/MarkdownNoteDetail.styl

+22-2
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
display flex
4040
align-items center
4141
div
42-
width 100px
42+
width 40px
4343
height 100%
4444
background-color #f9f9f9
4545
display flex
@@ -73,7 +73,27 @@ body[data-theme="dark"]
7373
.control-fullScreenButton
7474
topBarButtonDark()
7575

76+
.mode-tab
77+
border 1px solid #444444
78+
div
79+
background-color $ui-dark-noteDetail-backgroundColor
80+
&:first-child
81+
border-right 1px solid #444444
82+
.active
83+
background-color #3A404C
84+
box-shadow 2px 0px 7px #444444
85+
7686
body[data-theme="solarized-dark"]
7787
.root
7888
border-left 1px solid $ui-solarized-dark-borderColor
79-
background-color $ui-solarized-dark-noteDetail-backgroundColor
89+
background-color $ui-solarized-dark-noteDetail-backgroundColor
90+
91+
.mode-tab
92+
border 1px solid #586E75
93+
div
94+
background-color $ui-solarized-dark-noteDetail-backgroundColor
95+
&:first-child
96+
border-right 1px solid #586E75
97+
.active
98+
background-color #002B36
99+
box-shadow 2px 0px 7px #222222
Loading
Loading

resources/icon/icon-mode-split-on.svg

+1-1
Loading

0 commit comments

Comments
 (0)