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

fix: status bar color when modal is visible #28407

Merged
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
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