Skip to content

Commit

Permalink
#1755 ダークモード対応(初期調整)
Browse files Browse the repository at this point in the history
  • Loading branch information
Romot committed Jan 30, 2024
1 parent 23fe259 commit a8a62af
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 27 deletions.
8 changes: 7 additions & 1 deletion public/themes/dark.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
"warning": "#F27483",
"text-splitter-hover": "#394152",
"active-point-focus": "#292F38",
"active-point-hover": "#272A2F"
"active-point-hover": "#272A2F",
"sequencer-white-cell": "#393939",
"sequencer-black-cell": "#2D2D2D",
"sequencer-main-divider": "#121212",
"sequencer-sub-divider": "#333333",
"sequencer-white-key": "#EEEEEE",
"sequencer-black-key": "#555555"
}
}
8 changes: 7 additions & 1 deletion public/themes/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@
"warning": "#C10015",
"text-splitter-hover": "#CCDDFF",
"active-point-focus": "#E0EAFF",
"active-point-hover": "#EEF3FF"
"active-point-hover": "#EEF3FF",
"sequencer-white-cell": "#F5F7F5",
"sequencer-black-cell": "#EAECEA",
"sequencer-main-divider": "#CCCCCC",
"sequencer-sub-divider": "#DDDDDD",
"sequencer-white-key": "#FFFFFF",
"sequencer-black-key": "#333333"
}
}
34 changes: 26 additions & 8 deletions src/components/Sing/ScoreSequencer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,17 @@
:height="gridCellHeight"
:class="`sequencer-grid-cell sequencer-grid-cell-${keyInfo.color}`"
/>
<!-- オクターブのライン / オクターブのみに引きたい -->
<line
v-for="(keyInfo, index) in keyInfos"
:key="index"
x1="0"
:x2="gridCellWidth"
:y1="gridCellHeight * index"
:y2="gridCellHeight * index"
stroke-width="1"
:class="`sequencer-grid-p-line-${keyInfo.pitch.toLowerCase()}`"
/>
</pattern>
<pattern
id="sequencer-grid-measure"
Expand Down Expand Up @@ -1037,9 +1048,7 @@ onDeactivated(() => {
.sequencer-corner {
grid-row: 1;
grid-column: 1;
background: #fff;
border-bottom: 1px solid #ccc;
border-right: 1px solid #ccc;
background: colors.$background;
}
.sequencer-ruler {
Expand Down Expand Up @@ -1067,26 +1076,35 @@ onDeactivated(() => {
.sequencer-grid-cell {
display: block;
stroke: #e8e8e8;
stroke: colors.$sequencer-sub-divider;
stroke-width: 1;
}
.sequencer-grid-octave-cell {
stroke: colors.$sequencer-main-divider;
}
.sequencer-grid-cell-white {
fill: #fff;
fill: colors.$sequencer-white-cell;
}
.sequencer-grid-cell-black {
fill: #f2f2f2;
fill: colors.$sequencer-black-cell;
}
.sequencer-grid-pitch-line-c {
backface-visibility: hidden;
stroke: colors.$sequencer-main-divider;
}
.sequencer-grid-measure-line {
backface-visibility: hidden;
stroke: #b0b0b0;
stroke: colors.$sequencer-main-divider;
}
.sequencer-grid-beat-line {
backface-visibility: hidden;
stroke: #d0d0d0;
stroke: colors.$sequencer-sub-divider;
}
.sequencer-guideline {
Expand Down
9 changes: 4 additions & 5 deletions src/components/Sing/SequencerKeys.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,13 +176,12 @@ onUnmounted(() => {
.sequencer-keys {
backface-visibility: hidden;
background: colors.$background;
border-right: 1px solid #ccc;
overflow: hidden;
}
.white-key {
fill: #fff;
stroke: #ccc;
fill: colors.$sequencer-white-key;
stroke: colors.$sequencer-main-divider;
}
.white-key-being-pressed {
Expand All @@ -191,14 +190,14 @@ onUnmounted(() => {
}
.black-key {
fill: #5a5a5a;
fill: colors.$sequencer-black-key;
}
.black-key-being-pressed {
fill: colors.$primary;
}
.pitchname {
fill: #555;
fill: colors.$sequencer-black-key;
}
</style>
2 changes: 1 addition & 1 deletion src/components/Sing/SequencerNote.vue
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ const onLyricInputBlur = () => {
min-width: 20px;
padding: 0 1px 2px;
background: white;
color: colors.$display;
color: #000;
border: 1px solid hsl(130, 0%, 91%);
border-radius: 3px;
font-size: 12px;
Expand Down
2 changes: 1 addition & 1 deletion src/components/Sing/SequencerPhraseIndicator.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ const className = computed(() => {
}
.could-not-render {
background-color: #ff6a64;
background-color: colors.$warning;
}
.playable {
Expand Down
13 changes: 7 additions & 6 deletions src/components/Sing/SequencerRuler.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<line
x1="0"
x2="0"
y1="0"
y1="20"
:y2="height"
stroke-width="1"
class="sequencer-ruler-measure-line"
/>
<line
:x1="measureWidth"
:x2="measureWidth"
y1="0"
y1="20"
:y2="height"
stroke-width="1"
class="sequencer-ruler-measure-line"
Expand All @@ -30,7 +30,7 @@
<text
v-for="measureInfo in measureInfos"
:key="measureInfo.number"
font-size="14"
font-size="12"
:x="measureInfo.x + 6"
y="18"
class="sequencer-ruler-measure-number"
Expand Down Expand Up @@ -204,7 +204,8 @@ onUnmounted(() => {
top: 0;
width: 100%;
height: 100%;
border-bottom: 1px solid #ccc;
border-top: 1px solid colors.$surface;
border-bottom: 1px solid colors.$surface;
}
.sequencer-ruler-playhead {
Expand All @@ -220,11 +221,11 @@ onUnmounted(() => {
}
.sequencer-ruler-measure-number {
fill: #555;
fill: rgba(colors.$display-rgb, 0.6);
}
.sequencer-ruler-measure-line {
backface-visibility: hidden;
stroke: #b0b0b0;
stroke: rgba(colors.$display-rgb, 0.3);
}
</style>
7 changes: 3 additions & 4 deletions src/components/Sing/ToolBar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -347,19 +347,18 @@ onUnmounted(() => {
}
.character-style {
color: #999;
color: rgba(colors.$display-rgb, 0.6);
font-size: 0.75rem;
font-weight: bold;
line-height: 1rem;
}
.character-menu-dropdown-icon {
color: rgba(0, 0, 0, 0.54);
color: rgba(colors.$display-rgb, 0.8);
margin-left: 0.25rem;
}
.sing-toolbar {
border-top: 1px solid #ccc;
border-bottom: 1px solid #ccc;
background: colors.$sing-toolbar;
align-items: center;
display: flex;
justify-content: space-between;
Expand Down
11 changes: 11 additions & 0 deletions src/styles/colors.scss
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,18 @@ $active-point-focus-rgb: var(--color-active-point-focus-rgb);
$active-point-hover: var(--color-active-point-hover);
$active-point-hover-rgb: var(--color-active-point-hover-rgb);

$sequencer-white-cell: var(--color-sequencer-white-cell);
$sequencer-black-cell: var(--color-sequencer-black-cell);
$sequencer-main-divider: var(--color-sequencer-main-divider);
$sequencer-sub-divider: var(--color-sequencer-sub-divider);
$sequencer-white-key: var(--color-sequencer-white-key);
$sequencer-black-key: var(--color-sequencer-black-key);

// ダークテーマと通常テーマで変わる色
:root {
--color-toolbar: var(--color-primary);
--color-toolbar-rgb: var(--color-primary-rgb);
--color-sing-toolbar: var(--color-background);

--color-toolbar-button: var(--color-background);
--color-toolbar-button-rgb: var(--color-background-rgb);
Expand All @@ -54,6 +62,7 @@ $active-point-hover-rgb: var(--color-active-point-hover-rgb);
:root[is-dark-theme="true"] {
--color-toolbar: var(--color-surface);
--color-toolbar-rgb: var(--color-surface-rgb);
--color-sing-toolbar: var(--color-surface);

--color-toolbar-button: var(--color-primary);
--color-toolbar-button-rgb: var(--color-primary-rgb);
Expand All @@ -76,6 +85,8 @@ $active-point-hover-rgb: var(--color-active-point-hover-rgb);
$toolbar: var(--color-toolbar);
$toolbar-rgb: var(--color-toolbar-rgb);

$sing-toolbar: var(--color-sing-toolbar);

$toolbar-button: var(--color-toolbar-button);
$toolbar-button-rgb: var(--color-toolbar-button-rgb);

Expand Down

0 comments on commit a8a62af

Please sign in to comment.