mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-08 15:54:57 +01:00
Sort palette colors by name only
This commit is contained in:
parent
7f80883eb1
commit
cb156db99d
1 changed files with 1 additions and 8 deletions
|
|
@ -283,15 +283,8 @@ struct NamedColor {
|
||||||
|
|
||||||
struct SortNamedColor {
|
struct SortNamedColor {
|
||||||
bool operator() (NamedColor const & a, NamedColor const & b) {
|
bool operator() (NamedColor const & a, NamedColor const & b) {
|
||||||
using namespace ArdourCanvas;
|
|
||||||
|
|
||||||
const HSV black (0, 0, 0);
|
|
||||||
if (a.color.is_gray() || b.color.is_gray()) {
|
|
||||||
return black.distance (a.color) < black.distance (b.color);
|
|
||||||
} else {
|
|
||||||
return a.name < b.name;
|
return a.name < b.name;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue