mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 18:08:10 +00:00
Re-defactor ColorSorter.
This hopefully cures Richard's compilation woes.
This commit is contained in:
parent
496dba4532
commit
7f1d33efc1
@ -23,12 +23,14 @@
|
||||
#include "BufferView.h"
|
||||
#include "Color.h"
|
||||
#include "ColorCache.h"
|
||||
#include "ColorSet.h"
|
||||
#include "Cursor.h"
|
||||
#include "FuncRequest.h"
|
||||
#include "Language.h"
|
||||
#include "Paragraph.h"
|
||||
|
||||
#include "support/gettext.h"
|
||||
#include "support/lstrings.h"
|
||||
|
||||
#include <QAbstractItemModel>
|
||||
#include <QComboBox>
|
||||
@ -190,7 +192,16 @@ void fillComboColor(QComboBox * combo, QList<T> const & list)
|
||||
combo->addItem(qt_("Reset"), "inherit");
|
||||
}
|
||||
|
||||
|
||||
struct ColorSorter
|
||||
{
|
||||
bool operator()(ColorCode lhs, ColorCode rhs) const {
|
||||
return
|
||||
support::compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace anon
|
||||
|
||||
GuiCharacter::GuiCharacter(GuiView & lv)
|
||||
: GuiDialog(lv, "character", qt_("Text Style")), font_(ignore_font, ignore_language),
|
||||
|
@ -1096,6 +1096,19 @@ void PrefScreenFonts::selectTypewriter(const QString & name)
|
||||
/////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
namespace {
|
||||
|
||||
struct ColorSorter
|
||||
{
|
||||
bool operator()(ColorCode lhs, ColorCode rhs) const {
|
||||
return
|
||||
compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0;
|
||||
}
|
||||
};
|
||||
|
||||
} // namespace anon
|
||||
|
||||
|
||||
PrefColors::PrefColors(GuiPreferences * form)
|
||||
: PrefModule(catLookAndFeel, N_("Colors"), form)
|
||||
{
|
||||
|
@ -13,9 +13,7 @@
|
||||
#ifndef QTHELPERS_H
|
||||
#define QTHELPERS_H
|
||||
|
||||
#include "ColorSet.h"
|
||||
#include "Length.h"
|
||||
#include "support/lstrings.h"
|
||||
#include "support/qstring_helpers.h"
|
||||
#include "support/filetools.h"
|
||||
#include "qt_i18n.h"
|
||||
@ -39,12 +37,6 @@ namespace frontend {
|
||||
|
||||
class LengthCombo;
|
||||
|
||||
struct ColorSorter {
|
||||
bool operator()(ColorCode lhs, ColorCode rhs) const {
|
||||
return support::compare_no_case(lcolor.getGUIName(lhs), lcolor.getGUIName(rhs)) < 0;
|
||||
}
|
||||
};
|
||||
|
||||
/// method to get a Length from widgets (LengthCombo)
|
||||
std::string widgetsToLength(QLineEdit const * input, LengthCombo const * combo);
|
||||
/// method to get a Length from widgets (QComboBox)
|
||||
|
Loading…
Reference in New Issue
Block a user