feat: added region color customization feature

This commit is contained in:
Xiaohan-Tian
2026-07-01 22:31:35 -07:00
parent e626e1fc76
commit 4f11fe8e25
31 changed files with 700 additions and 31 deletions
+5
View File
@@ -15,6 +15,7 @@ import { DEBUG_MODE } from '../constants';
import { useProjectStore } from '../stores/projectStore';
import { useRegionOperations } from './useRegionOperations';
import { getAudioRegionDisplayLengthBeats } from '../util/globalTrackUtil';
import { resolveRegionColor } from '../util/regionColor';
const DEFAULT_REGION_CLICK_OPTIONS: RegionClickOptions = {
shiftKey: false,
@@ -179,6 +180,10 @@ export function useMainContentRegions({
barNumber,
length,
name: region.getName(),
color: region.getColor(),
trackColor: track.getColor(),
effectiveColor: resolveRegionColor(region.getColor(), track.getColor(), region instanceof KGAudioRegion),
isAudioRegion: region instanceof KGAudioRegion,
});
}
});