mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-07 12:32:26 +00:00
GuiBox: sort colors
This commit is contained in:
parent
bca8f5a940
commit
a98cfe1874
@ -103,6 +103,19 @@ static QList<ColorCode> colors()
|
||||
}
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
struct ColorSorter
|
||||
{
|
||||
bool operator()(ColorCode lhs, ColorCode rhs) const {
|
||||
return
|
||||
support::compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
GuiBox::GuiBox(QWidget * parent) : InsetParamsWidget(parent)
|
||||
{
|
||||
setupUi(this);
|
||||
@ -156,6 +169,7 @@ GuiBox::GuiBox(QWidget * parent) : InsetParamsWidget(parent)
|
||||
|
||||
// the background can be uncolored while the frame cannot
|
||||
color_codes_ = colors();
|
||||
sort(color_codes_.begin(), color_codes_.end(), ColorSorter());
|
||||
fillComboColor(backgroundColorCO, true);
|
||||
fillComboColor(frameColorCO, false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user