diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/features/appearance/index.ts | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/src/features/appearance/index.ts b/src/features/appearance/index.ts index 8b7416126..652ab5310 100644 --- a/src/features/appearance/index.ts +++ b/src/features/appearance/index.ts | |||
@@ -134,7 +134,7 @@ function generateServiceRibbonWidthStyle( | |||
134 | sidebarServicesLocation, | 134 | sidebarServicesLocation, |
135 | useGrayscaleServices, | 135 | useGrayscaleServices, |
136 | grayscaleServicesDim, | 136 | grayscaleServicesDim, |
137 | showDragArea, | 137 | shouldShowDragArea, |
138 | ) { | 138 | ) { |
139 | const width = Number(widthStr); | 139 | const width = Number(widthStr); |
140 | const iconSize = Number(iconSizeStr) - iconSizeBias; | 140 | const iconSize = Number(iconSizeStr) - iconSizeBias; |
@@ -212,7 +212,7 @@ function generateServiceRibbonWidthStyle( | |||
212 | const graysacleServices = `filter: grayscale(1); | 212 | const graysacleServices = `filter: grayscale(1); |
213 | opacity: ${grayscaleServicesDim}%;`; | 213 | opacity: ${grayscaleServicesDim}%;`; |
214 | 214 | ||
215 | const sizeDragArea = showDragArea ? verticalStyleOffset : 0; | 215 | const sizeDragArea = shouldShowDragArea ? verticalStyleOffset : 0; |
216 | return horizontal | 216 | return horizontal |
217 | ? ` | 217 | ? ` |
218 | .sidebar { | 218 | .sidebar { |
@@ -359,7 +359,7 @@ function generateOpenWorkspaceStyle() { | |||
359 | `; | 359 | `; |
360 | } | 360 | } |
361 | 361 | ||
362 | function generateStyle(settings) { | 362 | function generateStyle(settings, app) { |
363 | let style = ''; | 363 | let style = ''; |
364 | 364 | ||
365 | const { | 365 | const { |
@@ -375,6 +375,10 @@ function generateStyle(settings) { | |||
375 | showServiceName, | 375 | showServiceName, |
376 | } = settings; | 376 | } = settings; |
377 | 377 | ||
378 | const { isFullScreen } = app; | ||
379 | |||
380 | const shouldShowDragArea = showDragArea && !isFullScreen; | ||
381 | |||
378 | if ( | 382 | if ( |
379 | accentColor.toLowerCase() !== DEFAULT_APP_SETTINGS.accentColor.toLowerCase() | 383 | accentColor.toLowerCase() !== DEFAULT_APP_SETTINGS.accentColor.toLowerCase() |
380 | ) { | 384 | ) { |
@@ -389,10 +393,10 @@ function generateStyle(settings) { | |||
389 | sidebarServicesLocation, | 393 | sidebarServicesLocation, |
390 | useGrayscaleServices, | 394 | useGrayscaleServices, |
391 | grayscaleServicesDim, | 395 | grayscaleServicesDim, |
392 | showDragArea, | 396 | shouldShowDragArea, |
393 | ); | 397 | ); |
394 | 398 | ||
395 | if (showDragArea) { | 399 | if (shouldShowDragArea) { |
396 | style += generateShowDragAreaStyle(accentColor); | 400 | style += generateShowDragAreaStyle(accentColor); |
397 | } | 401 | } |
398 | if (useHorizontalStyle) { | 402 | if (useHorizontalStyle) { |
@@ -420,14 +424,14 @@ function updateProgressbar(settings) { | |||
420 | }); | 424 | }); |
421 | } | 425 | } |
422 | 426 | ||
423 | function updateStyle(settings) { | 427 | function updateStyle(settings, app) { |
424 | const style = generateStyle(settings); | 428 | const style = generateStyle(settings, app); |
425 | setAppearance(style); | 429 | setAppearance(style); |
426 | updateProgressbar(settings); | 430 | updateProgressbar(settings); |
427 | } | 431 | } |
428 | 432 | ||
429 | export default function initAppearance(stores) { | 433 | export default function initAppearance(stores) { |
430 | const { settings } = stores; | 434 | const { settings, app } = stores; |
431 | createStyleElement(); | 435 | createStyleElement(); |
432 | updateProgressbar(settings); | 436 | updateProgressbar(settings); |
433 | 437 | ||
@@ -445,9 +449,10 @@ export default function initAppearance(stores) { | |||
445 | settings.all.app.useHorizontalStyle, | 449 | settings.all.app.useHorizontalStyle, |
446 | settings.all.app.alwaysShowWorkspaces, | 450 | settings.all.app.alwaysShowWorkspaces, |
447 | settings.all.app.showServiceName, | 451 | settings.all.app.showServiceName, |
452 | app.isFullScreen, | ||
448 | ], | 453 | ], |
449 | () => { | 454 | () => { |
450 | updateStyle(settings.all.app); | 455 | updateStyle(settings.all.app, app); |
451 | }, | 456 | }, |
452 | { fireImmediately: true }, | 457 | { fireImmediately: true }, |
453 | ); | 458 | ); |