fix(expand-all): Fixes for dark theme, don't show expand when one message

This commit is contained in:
Ben Gotow 2015-12-07 18:01:06 -08:00
parent b12d23a33d
commit 0af5fea3dc
4 changed files with 17 additions and 8 deletions

View file

@ -225,19 +225,25 @@ class MessageList extends React.Component
</div>
_renderIcons: =>
expandTitle = if MessageStore.hasCollapsedItems()
"Expand All"
else
"Collapse All"
<div className="message-icons-wrap">
<div onClick={@_onToggleAllMessagesExpanded}>
<RetinaImg name="expand.png" fallback="expand.png" title={expandTitle} mode={RetinaImg.Mode.ContentPreserve}/>
</div>
{@_renderExpandToggle()}
<div onClick={@_onPrintThread}>
<RetinaImg name="print.png" fallback="print.png" title="Print Thread" mode={RetinaImg.Mode.ContentPreserve}/>
<RetinaImg name="print.png" title="Print Thread" mode={RetinaImg.Mode.ContentIsMask}/>
</div>
</div>
_renderExpandToggle: =>
if MessageStore.items().length < 2
<span></span>
else if MessageStore.hasCollapsedItems()
<div onClick={@_onToggleAllMessagesExpanded}>
<RetinaImg name={"expand.png"} title={"Expand All"} mode={RetinaImg.Mode.ContentIsMask}/>
</div>
else
<div onClick={@_onToggleAllMessagesExpanded}>
<RetinaImg name={"collapse.png"} title={"Collapse All"} mode={RetinaImg.Mode.ContentIsMask}/>
</div>
_renderLabels: =>
labels = @state.currentThread.sortedLabels()
labels = _.reject labels, (l) -> l.name is 'important'

View file

@ -150,6 +150,9 @@ body.platform-win32 {
display: flex;
align-items: center;
img {
background: @text-color-subtle;
}
div + div {
margin-left: @padding-xs-horizontal;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 15 KiB