Skip to content

Commit 2b9886b

Browse files
DevonRDspacey-sooty
authored andcommitted
Fix button theming for custom themes (PhotonVision#2216)
1 parent 62649dd commit 2b9886b

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

photon-client/src/components/cameras/CameraSettingsCard.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ const wrappedCameras = computed<SelectItem[]>(() =>
177177
<v-btn
178178
block
179179
size="small"
180-
color="primary"
180+
color="buttonActive"
181181
:disabled="!settingsHaveChanged()"
182182
:variant="theme.global.name.value === 'LightTheme' ? 'elevated' : 'outlined'"
183183
@click="saveCameraSettings"

photon-client/src/lib/ThemeManager.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,11 +52,12 @@ export const restoreThemeConfig = (theme: ThemeInstance) => {
5252
: (customSurface ?? defaultTheme.colors!.sidebar!);
5353

5454
theme.themes.value[theme.global.name.value].colors.primary = customPrimary ?? defaultTheme.colors!.primary!;
55-
theme.themes.value[theme.global.name.value].colors.buttonActive = customPrimary ?? defaultTheme.colors!.buttonActive!;
55+
theme.themes.value[theme.global.name.value].colors.buttonActive =
56+
(themeType === "light" ? customPrimary : customSecondary) ?? defaultTheme.colors!.buttonActive!;
5657

5758
theme.themes.value[theme.global.name.value].colors.secondary = customSecondary ?? defaultTheme.colors!.secondary!;
5859
theme.themes.value[theme.global.name.value].colors.buttonPassive =
59-
customSecondary ?? defaultTheme.colors!.buttonPassive!;
60+
(themeType === "light" ? customSecondary : customPrimary) ?? defaultTheme.colors!.buttonPassive!;
6061

6162
theme.themes.value[theme.global.name.value].colors.accent = customSecondary ?? defaultTheme.colors!.accent!;
6263
theme.themes.value[theme.global.name.value].colors.toggle = customSecondary ?? defaultTheme.colors!.toggle!;

0 commit comments

Comments
 (0)