1
0
mirror of https://github.com/laurent22/joplin.git synced 2024-12-24 10:27:10 +02:00

Desktop: Resolves #9998: Fixed text wrapping in Spellcheck button (#10005)

This commit is contained in:
Radith Samarakoon 2024-03-04 16:03:39 +05:30 committed by GitHub
parent b812027281
commit 5aba1e38a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 10 additions and 2 deletions

View File

@ -69,6 +69,7 @@ function styles_(props: Props) {
},
toolbarStyle: {
marginBottom: 0,
minWidth: 0,
},
};
});

View File

@ -28,6 +28,7 @@ class ToolbarBaseComponent extends React.Component<Props, any> {
display: 'flex',
flexDirection: 'row',
boxSizing: 'border-box',
minWidth: 0,
};
const leftItemComps: any[] = [];

View File

@ -43,7 +43,10 @@ export default function ToolbarButton(props: Props) {
if (!isEnabled) classes.push('disabled');
const onClick = getProp(props, 'onClick');
const style: React.CSSProperties = {
whiteSpace: 'nowrap',
overflow: 'hidden',
textOverflow: 'ellipsis' };
return (
<StyledRoot
className={classes.join(' ')}
@ -56,7 +59,7 @@ export default function ToolbarButton(props: Props) {
}}
>
{icon}
{title}
<span style={style}>{title}</span>
</StyledRoot>
);
}

View File

@ -23,6 +23,9 @@ export const StyledRoot = styled.a<RootProps>`
font-size: ${(props: RootProps) => props.theme.toolbarIconSize * 0.8}px;
padding-left: 5px;
padding-right: 5px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
&:hover {
background-color: ${(props: RootProps) => props.disabled ? 'none' : props.theme.backgroundColorHover3};