]> git.lyx.org Git - features.git/commitdiff
Simplify
authorJuergen Spitzmueller <spitz@lyx.org>
Sun, 1 Oct 2023 09:38:10 +0000 (11:38 +0200)
committerJuergen Spitzmueller <spitz@lyx.org>
Sun, 1 Oct 2023 09:38:10 +0000 (11:38 +0200)
src/insets/InsetBox.cpp
src/insets/InsetBox.h

index b1444ecd79cd8f7b861de0cbf243debe6159f6a2..1643a0df52ce48e9491998aa85bcd7c8c9db86fb 100644 (file)
@@ -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;
 }
 
index 29c713716c2a56cbdb1bb102a3744301b1957fa2..f4a743667bbf9826c822df9443fb96efd41b637e 100644 (file)
@@ -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;