mirror of https://github.com/laurent22/joplin.git
Electron: Rotate sidebar icon when it is hidden
parent
02bde2c6e9
commit
984dd6f2c0
|
@ -72,9 +72,10 @@ class HeaderComponent extends React.Component {
|
|||
if (options.iconName) {
|
||||
const iconStyle = {
|
||||
fontSize: Math.round(style.fontSize * 1.4),
|
||||
color: style.color
|
||||
color: style.color,
|
||||
};
|
||||
if (options.title) iconStyle.marginRight = 5;
|
||||
if (options.iconRotation) iconStyle.transform = 'rotate(' + options.iconRotation + 'deg)';
|
||||
icon = <i style={iconStyle} className={"fa " + options.iconName}></i>
|
||||
}
|
||||
|
||||
|
|
|
@ -311,6 +311,7 @@ class MainScreenComponent extends React.Component {
|
|||
headerItems.push({
|
||||
title: _('Toggle sidebar'),
|
||||
iconName: 'fa-bars',
|
||||
iconRotation: this.props.sidebarVisibility ? 0 : 90,
|
||||
onClick: () => { this.doCommand({ name: 'toggleSidebar'}) }
|
||||
});
|
||||
|
||||
|
@ -426,6 +427,7 @@ const mapStateToProps = (state) => {
|
|||
hasDisabledSyncItems: state.hasDisabledSyncItems,
|
||||
showMissingMasterKeyMessage: state.notLoadedMasterKeys.length && state.masterKeys.length,
|
||||
selectedFolderId: state.selectedFolderId,
|
||||
sidebarVisibility: state.sidebarVisibility,
|
||||
};
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue