🎨(signature): Fix signature dropdown styling on different themes

Summary: Ran into issues with the selected tag having different styles associated with it in taiga and in darkside. Fixed these.

Test Plan: Tested on my machine

Reviewers: jackie

Reviewed By: jackie

Subscribers: jackie

Differential Revision: https://phab.nylas.com/D3144
This commit is contained in:
Annie 2016-07-29 16:34:38 -07:00
parent 3678c23515
commit b46f60fc1c
4 changed files with 17 additions and 21 deletions

View file

@ -173,7 +173,6 @@ export default class CategoryPickerPopover extends Component {
const {account, threads} = this.props
if (threads.length === 0) return;
this.refs.menu.setSelectedItem(null)
if (item.newCategoryItem) {
const category = new Category({

View file

@ -113,9 +113,11 @@
.item.checked {
background-image: url(images/menu/osx-checkmark@2x.svg);
background-position: left;
background-position-x: 5%;
background-position-x: 6%;
background-size: 10px;
padding-right: 0;
margin: 0;
padding: 5px 10px 5px 25px;
background-repeat: no-repeat;
}
}
}
@ -178,6 +180,7 @@
background-position: left;
background-position-x: 5%;
background-size: 10px;
background-repeat: no-repeat;
}
}

View file

@ -67,8 +67,9 @@ body.platform-win32 {
.secondary-items {
.item {
color: @taiga-light !important;
background: @white !important;
.search-match {
background: @white !important;
}
.button-dropdown {
img {
background: @taiga-light !important;
@ -92,22 +93,12 @@ body.platform-win32 {
border: none !important;
}
/**
* Search bar
*/
.content-container {
.item.selected {
background: @taiga-light !important;
color: @white !important;
}
}
/**
* Dropdown
*/
.menu {
.item.selected {
background: @taiga-light !important;
.primary {
color: @white !important;
}
@ -115,6 +106,15 @@ body.platform-win32 {
color: @taiga-lighter !important;
}
}
&.search-container {
.item {
background: @white !important;
}
.item.selected {
background: @taiga-light !important;
color: @white !important;
}
}
}
/**

View file

@ -166,11 +166,6 @@ class Menu extends React.Component
getSelectedItem: =>
@props.items[@state.selectedIndex]
# Public: Set the currently selected item. Pass
# null to remove the selection
#
setSelectedItem: (item) =>
@setState selectedIndex: @props.items.indexOf(item)
componentWillReceiveProps: (newProps) =>
# Attempt to preserve selection across props.items changes by
@ -242,7 +237,6 @@ class Menu extends React.Component
_itemComponentForItem: (item, i) =>
content = @props.itemContent(item)
if React.isValidElement(content) and content.type is MenuItem
return content