Browse Source

set title to vertical center

master
jeffvli 3 years ago
parent
commit
375f9e612d
  1. 12
      src/components/layout/Titlebar.tsx
  2. 20
      src/styles/App.global.css

12
src/components/layout/Titlebar.tsx

@ -20,16 +20,8 @@ const Titlebar = () => {
return ( return (
<TitleHeader id="titlebar"> <TitleHeader id="titlebar">
<DragRegion id="drag-region"> <DragRegion id="drag-region">
<div <div id="window-title-wrapper">
id="window-title" <span id="window-title">{title}</span>
style={{
width: 'calc(80%)',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
}}
>
<span>{title}</span>
</div> </div>
<WindowControl id="window-controls"> <WindowControl id="window-controls">
<WindowControlButton minButton className="button" id="min-button"> <WindowControlButton minButton className="button" id="min-button">

20
src/styles/App.global.css

@ -93,11 +93,6 @@ h1 {
} }
} }
.maximized #titlebar {
width: 100%;
padding: 0;
}
#window-controls .button { #window-controls .button {
grid-row: 1 / span 1; grid-row: 1 / span 1;
display: flex; display: flex;
@ -107,6 +102,21 @@ h1 {
height: 100%; height: 100%;
} }
#window-title-wrapper {
width: calc(80%);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 100%;
padding: 2px;
}
#window-title {
display: inline-block;
vertical-align: middle;
line-height: normal;
}
#restore-button { #restore-button {
display: none !important; display: none !important;
} }

Loading…
Cancel
Save