mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-18 05:37:11 +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)
|
GuiBox::GuiBox(QWidget * parent) : InsetParamsWidget(parent)
|
||||||
{
|
{
|
||||||
setupUi(this);
|
setupUi(this);
|
||||||
@ -156,6 +169,7 @@ GuiBox::GuiBox(QWidget * parent) : InsetParamsWidget(parent)
|
|||||||
|
|
||||||
// the background can be uncolored while the frame cannot
|
// the background can be uncolored while the frame cannot
|
||||||
color_codes_ = colors();
|
color_codes_ = colors();
|
||||||
|
sort(color_codes_.begin(), color_codes_.end(), ColorSorter());
|
||||||
fillComboColor(backgroundColorCO, true);
|
fillComboColor(backgroundColorCO, true);
|
||||||
fillComboColor(frameColorCO, false);
|
fillComboColor(frameColorCO, false);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user