Skip to content

Commit

Permalink
Improve plugin action button contrast in dark mode (#2766)
Browse files Browse the repository at this point in the history
  • Loading branch information
haticekaratay authored Mar 21, 2024
1 parent 9bb02fc commit 623afbb
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
17 changes: 15 additions & 2 deletions jdaviz/components/plugin_action_button.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<v-btn :disabled="spinner || disabled"
text
:color="results_isolated_to_plugin ? 'primary' : 'accent'"
:color=buttonColor
@click="$emit('click')"
>
<v-progress-circular
Expand All @@ -19,6 +19,19 @@

<script>
module.exports = {
props: ['spinner', 'disabled', 'results_isolated_to_plugin']
props: ['spinner', 'disabled', 'results_isolated_to_plugin'],
computed: {
buttonColor() {
if (this.results_isolated_to_plugin) {
return this.$vuetify.theme.dark
? this.$vuetify.theme.themes.dark.primary
: this.$vuetify.theme.themes.light.primary;
} else {
return this.$vuetify.theme.dark
? this.$vuetify.theme.themes.dark.accent
: this.$vuetify.theme.themes.light.accent;
}
}
}
};
</script>
4 changes: 2 additions & 2 deletions jdaviz/main_styles.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ export default {
};
this.$vuetify.theme.themes.dark = {
toolbar: "#153A4B",
primary: "#00617E",
primary: "#53CBFF",
secondary: "#007DA4",
accent: "#C75109",
accent: "#FF9D42",
turquoise: "#007BA1",
lightblue: "#E3F2FD",
spinner: "#ACE1FF",
Expand Down

0 comments on commit 623afbb

Please sign in to comment.