commit 242381464b44c5ceb790654e4e47507b7c9b465c
Author: Juergen Spitzmueller <[email protected]>
Date:   Sun Oct 1 11:38:10 2023 +0200

    Simplify
---
 src/insets/InsetBox.cpp |   10 ++++++----
 src/insets/InsetBox.h   |    2 +-
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/insets/InsetBox.cpp b/src/insets/InsetBox.cpp
index b1444ec..1643a0d 100644
--- a/src/insets/InsetBox.cpp
+++ b/src/insets/InsetBox.cpp
@@ -433,7 +433,7 @@ void InsetBox::latex(otexstream & os, OutputParams const & 
runparams) const
                        if (useFColorBox()) {
                                os << maybeBeginL
                                   << "\\fcolorbox{" << getFrameColor()
-                                  << "}{" << 
getBackgroundColor(buffer().params().isbackgroundcolor)
+                                  << "}{" << getBackgroundColor()
                                   << "}{" << "\\makebox";
                                needEndL = !maybeBeginL.empty();
                        } else
@@ -454,7 +454,7 @@ void InsetBox::latex(otexstream & os, OutputParams const & 
runparams) const
                        if (useFColorBox()) {
                                os << maybeBeginL
                                   << "\\fcolorbox{" << getFrameColor()
-                                  << "}{" << 
getBackgroundColor(buffer().params().isbackgroundcolor) << "}";
+                                  << "}{" << getBackgroundColor() << "}";
                                needEndL = !maybeBeginL.empty();
                        } else {
                                if (!cprotect.empty() && 
contains(runparams.active_chars, '^')) {
@@ -887,10 +887,12 @@ string const InsetBox::getFrameColor(bool const gui) const
 }
 
 
-string const InsetBox::getBackgroundColor(bool const custompb) const
+string const InsetBox::getBackgroundColor() const
 {
        if (params_.backgroundcolor == "none")
-               return custompb ? "page_backgroundcolor" : "white";
+               return buffer().params().isbackgroundcolor
+                               ? "page_backgroundcolor"
+                               : "white";
        return params_.backgroundcolor;
 }
 
diff --git a/src/insets/InsetBox.h b/src/insets/InsetBox.h
index 29c7137..f4a7436 100644
--- a/src/insets/InsetBox.h
+++ b/src/insets/InsetBox.h
@@ -166,7 +166,7 @@ private:
        ///
        std::string const getFrameColor(bool const gui = false) const;
        ///
-       std::string const getBackgroundColor(bool const custompb = false) const;
+       std::string const getBackgroundColor() const;
        ///
        bool useFColorBox() const;
 
-- 
lyx-cvs mailing list
[email protected]
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to