commit 7015d7db07080da2048dd3e66a4019c8b2c83865
Author: Juergen Spitzmueller <sp...@lyx.org>
Date:   Fri Dec 23 08:19:26 2022 +0100

    Mark "edit externally" button of preamble and local layout
    
    while external editing is underway
---
 src/frontends/qt/GuiDocument.cpp |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/src/frontends/qt/GuiDocument.cpp b/src/frontends/qt/GuiDocument.cpp
index 22e2069..33f79a7 100644
--- a/src/frontends/qt/GuiDocument.cpp
+++ b/src/frontends/qt/GuiDocument.cpp
@@ -576,7 +576,7 @@ void PreambleModule::editExternal() {
                preambleTE->document()->setPlainText(toqstr(s));
                tempfile_.reset();
                editPB->setText(qt_("&Edit Externally"));
-               editPB->setStyleSheet("");
+               editPB->setIcon(QIcon());
                changed();
                return;
        }
@@ -593,8 +593,8 @@ void PreambleModule::editExternal() {
        preambleTE->setReadOnly(true);
        theFormats().edit(*current_id_, tempfilename, format);
        editPB->setText(qt_("&End Edit"));
-       editPB->setStyleSheet(
-               colorButtonStyleSheet(QColor(255, 0, 0)));
+       QIcon warn(getPixmap("images/", "emblem-shellescape", "svgz,png"));
+       editPB->setIcon(warn);
        changed();
 }
 
@@ -755,6 +755,7 @@ void LocalLayout::editExternal() {
                locallayoutTE->document()->setPlainText(toqstr(s));
                tempfile_.reset();
                editPB->setText(qt_("&Edit Externally"));
+               editPB->setIcon(QIcon());
                changed();
                return;
        }
@@ -771,6 +772,8 @@ void LocalLayout::editExternal() {
        locallayoutTE->setReadOnly(true);
        theFormats().edit(*current_id_, tempfilename, format);
        editPB->setText(qt_("&End Edit"));
+       QIcon warn(getPixmap("images/", "emblem-shellescape", "svgz,png"));
+       editPB->setIcon(warn);
        validatePB->setEnabled(false);
        hideConvert();
        changed();
-- 
lyx-cvs mailing list
lyx-cvs@lists.lyx.org
http://lists.lyx.org/mailman/listinfo/lyx-cvs

Reply via email to