mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-10 04:30:25 +02:00
adjust custom window bar titles
- fix overflow - fix positioning - decrease text size
This commit is contained in:
@@ -5,8 +5,8 @@
|
|||||||
|
|
||||||
.windows-container {
|
.windows-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
gap: 0.5rem;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: space-between;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background: var(--theme-colors-background);
|
background: var(--theme-colors-background);
|
||||||
@@ -16,6 +16,7 @@
|
|||||||
|
|
||||||
.windows-button-group {
|
.windows-button-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex-shrink: 0;
|
||||||
width: 130px;
|
width: 130px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
-webkit-app-region: no-drag;
|
-webkit-app-region: no-drag;
|
||||||
@@ -48,26 +49,47 @@
|
|||||||
|
|
||||||
.player-status-container {
|
.player-status-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
flex: 1;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
max-width: 45vw;
|
align-items: center;
|
||||||
|
min-width: 0;
|
||||||
padding-left: 1rem;
|
padding-left: 1rem;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player-status-container > img {
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.player-status-text {
|
||||||
|
flex: 1;
|
||||||
|
width: 0;
|
||||||
|
min-width: 0;
|
||||||
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.macos-container .player-status-text {
|
||||||
|
flex: 0 1 auto;
|
||||||
|
width: auto;
|
||||||
|
max-width: 100%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
@media only screen and (width < 768px) {
|
@media only screen and (width < 768px) {
|
||||||
.player-status-container {
|
.player-status-container {
|
||||||
max-width: calc(100vw - 150px);
|
|
||||||
padding-left: 0.5rem;
|
padding-left: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.windows-button-group {
|
.windows-button-group {
|
||||||
|
flex-shrink: 0;
|
||||||
width: 120px;
|
width: 120px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.macos-container {
|
.macos-container {
|
||||||
|
position: relative;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
@@ -78,6 +100,18 @@
|
|||||||
-webkit-app-region: drag;
|
-webkit-app-region: drag;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.macos-container .player-status-container {
|
||||||
|
display: flex;
|
||||||
|
gap: 0;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
min-width: 0;
|
||||||
|
max-width: calc(100% - 140px);
|
||||||
|
padding: 0 0.5rem;
|
||||||
|
margin: 0 auto;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
.macos-button-group {
|
.macos-button-group {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 5px;
|
top: 5px;
|
||||||
|
|||||||
@@ -40,8 +40,10 @@ const WindowsControls = ({ controls, title }: WindowBarControlsProps) => {
|
|||||||
return (
|
return (
|
||||||
<div className={styles.windowsContainer}>
|
<div className={styles.windowsContainer}>
|
||||||
<div className={styles.playerStatusContainer}>
|
<div className={styles.playerStatusContainer}>
|
||||||
<img alt="" height={18} src={appIcon} width={18} />
|
<img alt="" height={16} src={appIcon} style={{ flexShrink: 0 }} width={16} />
|
||||||
<Text>{title}</Text>
|
<Text className={styles.playerStatusText} overflow="hidden" size="sm">
|
||||||
|
{title}
|
||||||
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.windowsButtonGroup}>
|
<div className={styles.windowsButtonGroup}>
|
||||||
<div className={styles.windowsButton} onClick={handleMinimize} role="button">
|
<div className={styles.windowsButton} onClick={handleMinimize} role="button">
|
||||||
@@ -116,7 +118,9 @@ const MacOsControls = ({ controls, title }: WindowBarControlsProps) => {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.playerStatusContainer}>
|
<div className={styles.playerStatusContainer}>
|
||||||
<Text>{title}</Text>
|
<Text className={styles.playerStatusText} overflow="hidden" size="sm">
|
||||||
|
{title}
|
||||||
|
</Text>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user