Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 5 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ function styles_(props: Props) {
},
toolbarStyle: {
marginBottom: 0,
minWidth: 0,
},
};
});
Expand Down
1 change: 1 addition & 0 deletions packages/app-desktop/gui/ToolbarBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ class ToolbarBaseComponent extends React.Component<Props, any> {
display: 'flex',
flexDirection: 'row',
boxSizing: 'border-box',
minWidth: 0,
};

const leftItemComps: any[] = [];
Expand Down
7 changes: 5 additions & 2 deletions packages/app-desktop/gui/ToolbarButton/ToolbarButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(' ')}
Expand All @@ -56,7 +59,7 @@ export default function ToolbarButton(props: Props) {
}}
>
{icon}
{title}
<span style={style}>{title}</span>
</StyledRoot>
);
}
Expand Down
3 changes: 3 additions & 0 deletions packages/app-desktop/gui/ToolbarButton/styles/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
Loading