mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +00:00
Use black as default color for an inset button label text
It turns out that LyX was using red as default color for the inset button text since ever. However, due to the use of "inherit", the default button text color was black in practice. This was so until [897ee2ed/lyxgit], which made the label font not inherited by default anymore. Hence, all insets that didn't specify a specific label button color started using red as default color. This commit restores the previous behavior and introduces the possibility of modifying this default color. Fixes bug #12771
This commit is contained in:
parent
5556cb3d3f
commit
ee9fca42bb
@ -11,7 +11,7 @@
|
||||
# This script will update a .layout file to current format
|
||||
|
||||
# The latest layout format is also defined in src/TextClass.cpp
|
||||
currentFormat = 99
|
||||
currentFormat = 100
|
||||
|
||||
|
||||
# Incremented to format 4, 6 April 2007, lasgouttes
|
||||
@ -334,6 +334,9 @@ currentFormat = 99
|
||||
# Incremented to format 99, 22 December 2022 by tcuvelier
|
||||
# Add DocBookGenerateTitle for Layout
|
||||
|
||||
# Incremented to format 100, 9 May 2023 by forenr
|
||||
# Add inset label color
|
||||
|
||||
# Do not forget to document format change in Customization
|
||||
# Manual (section "Declaring a new text class").
|
||||
|
||||
@ -580,7 +583,7 @@ def convert(lines, end_format):
|
||||
i += 1
|
||||
continue
|
||||
|
||||
if 87 <= format <= 98:
|
||||
if 87 <= format <= 100:
|
||||
# nothing to do.
|
||||
i += 1
|
||||
continue
|
||||
|
@ -318,6 +318,7 @@ ColorSet::ColorSet()
|
||||
{ Color_collapsible, N_("collapsible inset text"), "collapsible", DarkRed, DarkRed, "collapsible" },
|
||||
{ Color_collapsibleframe, N_("collapsible inset frame"), "collapsibleframe", IndianRed, IndianRed, "collapsibleframe" },
|
||||
{ Color_insetbg, N_("inset background"), "insetbg", grey80, grey80, "insetbg" },
|
||||
{ Color_insetlabel, N_("inset label"), "insetlabel", black, black, "insetlabel" },
|
||||
{ Color_insetframe, N_("inset frame"), "insetframe", IndianRed, IndianRed, "insetframe" },
|
||||
{ Color_error, N_("LaTeX error"), "error", red, DarkRed, "error" },
|
||||
{ Color_eolmarker, N_("end-of-line marker"), "eolmarker", Brown, Brown, "eolmarker" },
|
||||
|
@ -171,6 +171,8 @@ enum ColorCode {
|
||||
Color_insetbg,
|
||||
/// Inset marker frame color
|
||||
Color_insetframe,
|
||||
/// Inset marker label color
|
||||
Color_insetlabel,
|
||||
|
||||
/// Error box text color
|
||||
Color_error,
|
||||
|
@ -59,7 +59,7 @@ namespace lyx {
|
||||
// You should also run the development/tools/updatelayouts.py script,
|
||||
// to update the format of all of our layout files.
|
||||
//
|
||||
int const LAYOUT_FORMAT = 99; // tcuvelier: add docbookgeneratetitle
|
||||
int const LAYOUT_FORMAT = 100; // forenr: add inset label color
|
||||
|
||||
|
||||
// Layout format for the current lyx file format. Controls which format is
|
||||
|
@ -55,7 +55,7 @@ enum class InsetLaTeXType : int {
|
||||
class InsetLayout {
|
||||
public:
|
||||
///
|
||||
InsetLayout() { labelfont_.setColor(Color_error); }
|
||||
InsetLayout() { labelfont_.setColor(Color_insetlabel); }
|
||||
///
|
||||
bool read(Lexer & lexrc, TextClass const & tclass,
|
||||
bool validating = false);
|
||||
|
Loading…
Reference in New Issue
Block a user