Skip to content

Commit

Permalink
Merge pull request #28407 from ishpaul777/fix/status-bar-color-when-m…
Browse files Browse the repository at this point in the history
…odal-visible

fix: status bar color when modal is visible
  • Loading branch information
roryabraham authored Oct 2, 2023
2 parents b403ab5 + 0211641 commit 69ecebc
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/styles/StyleUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -678,10 +678,10 @@ function extractValuesFromRGB(color: string): number[] | null {
* @returns The theme color as an RGB value.
*/
function getThemeBackgroundColor(bgColor: string = themeColors.appBG): string {
const backdropOpacity = variables.modalFullscreenBackdropOpacity;
const backdropOpacity = variables.overlayOpacity;

const [backgroundRed, backgroundGreen, backgroundBlue] = extractValuesFromRGB(bgColor) ?? hexadecimalToRGBArray(bgColor) ?? [];
const [backdropRed, backdropGreen, backdropBlue] = hexadecimalToRGBArray(themeColors.modalBackdrop) ?? [];
const [backdropRed, backdropGreen, backdropBlue] = hexadecimalToRGBArray(themeColors.overlay) ?? [];
const normalizedBackdropRGB = convertRGBToUnitValues(backdropRed, backdropGreen, backdropBlue);
const normalizedBackgroundRGB = convertRGBToUnitValues(backgroundRed, backgroundGreen, backgroundBlue);
const [red, green, blue] = convertRGBAToRGB(normalizedBackdropRGB, normalizedBackgroundRGB, backdropOpacity);
Expand Down
1 change: 0 additions & 1 deletion src/styles/themes/default.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const darkTheme = {
textMutedReversed: colors.darkIcons,
textError: colors.red,
offline: colors.darkIcons,
modalBackdrop: colors.darkHighlightBackground,
modalBackground: colors.darkAppBackground,
cardBG: colors.darkHighlightBackground,
cardBorder: colors.darkHighlightBackground,
Expand Down
1 change: 0 additions & 1 deletion src/styles/themes/light.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ const lightTheme = {
textMutedReversed: colors.lightIcons,
textError: colors.red,
offline: colors.lightIcons,
modalBackdrop: colors.lightHighlightBackground,
modalBackground: colors.lightAppBackground,
cardBG: colors.lightHighlightBackground,
cardBorder: colors.lightHighlightBackground,
Expand Down
1 change: 0 additions & 1 deletion src/styles/variables.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ export default {
extraSmallMobileResponsiveWidthBreakpoint: 320,
extraSmallMobileResponsiveHeightBreakpoint: 667,
mobileResponsiveWidthBreakpoint: 800,
modalFullscreenBackdropOpacity: 0.5,
tabletResponsiveWidthBreakpoint: 1024,
safeInsertPercentage: 0.7,
sideBarWidth: 375,
Expand Down

0 comments on commit 69ecebc

Please sign in to comment.