6d78a8e2d7230272d15508db74169ad20cd76f3f braney Thu Apr 16 12:06:50 2026 -0700 Restrict color override to supported track types; add palette icon; deduplicate type check, refs #20460 Note: palette.png must be installed to htdocs/images/ (new file). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> diff --git src/hg/hgTrackUi/hgTrackUi.c src/hg/hgTrackUi/hgTrackUi.c index 9fabeab5f47..d4d3ac60db7 100644 --- src/hg/hgTrackUi/hgTrackUi.c +++ src/hg/hgTrackUi/hgTrackUi.c @@ -3451,37 +3451,31 @@ // NOTE: these cases that fall through the cracks should probably get folded into cfgByCfgType() else if (startsWithWord("expRatio", tdb->type)) expRatioUi(tdb); else if (startsWith("chromGraph", tdb->type)) chromGraphUi(tdb); else if (startsWith("sample", tdb->type)) genericWiggleUi(tdb,7); else if (startsWithWord("array",tdb->type)) // not quite the same as "expRatio" (custom tracks) expRatioCtUi(tdb); else if (startsWithWord("factorSource",tdb->type)) factorSourceUi(db,tdb); else if (startsWithWord("bigBed",tdb->type)) labelCfgUi(db, cart, tdb, tdb->track); } -if (!tdbIsComposite(tdb) - && (startsWithWord("bed", tdb->type) || startsWithWord("bigBed", tdb->type) - || startsWithWord("genePred", tdb->type) || startsWithWord("bigGenePred", tdb->type) - || startsWithWord("wig", tdb->type) || startsWithWord("bigWig", tdb->type) - || startsWithWord("rmsk", tdb->type) || startsWithWord("interact", tdb->type) - || startsWithWord("bigInteract", tdb->type) || startsWithWord("bigLolly", tdb->type) - || startsWithWord("vcfTabix", tdb->type) || startsWithWord("vcf", tdb->type))) +if (tdbSupportsColorOverride(tdb)) colorTrackOption(cart, tdb->track, tdb); if (!ajax) // ajax asks for a simple cfg dialog for right-click popup or hgTrackUi subtrack cfg { // Composites *might* have had their top level controls just printed, // but almost certainly have additional controls boolean isLogo = (trackDbSetting(tdb, "logo") != NULL); // It'd be nice to handle faceted composites as a separate container type, but practically so much // of the display features we want are identical to composites - it's easier to special case the UI. if (tdbIsComposite(tdb) && !isLogo) // for the moment generalizing this to include other containers... if (!sameOk(trackDbLocalSetting(tdb, "compositeTrack"), "faceted")) // but not faceted containers ... hCompositeUi(db, cart, tdb, NULL, NULL, MAIN_FORM); // Additional special case navigation links may be added extraUiLinks(db, tdb, cart);