commit 3b5deaa5c1794027555dd66d2e9f49d4d53a395c
Author: Koji Yokota <[email protected]>
Date: Tue Jun 10 09:58:06 2025 +0900
Fix initial ability of color edit buttons in PrefColors
---
src/frontends/qt/GuiPrefs.cpp | 12 ++++++++++++
src/frontends/qt/GuiPrefs.h | 2 ++
2 files changed, 14 insertions(+)
diff --git a/src/frontends/qt/GuiPrefs.cpp b/src/frontends/qt/GuiPrefs.cpp
index 8d558997d0..413e49dca0 100644
--- a/src/frontends/qt/GuiPrefs.cpp
+++ b/src/frontends/qt/GuiPrefs.cpp
@@ -1129,6 +1129,7 @@ void PrefColors::clickedColorsTV(const QModelIndex index)
if (column < 2)
changeColor(row, column);
+ enableEditButtons();
setResetButtonStatus(row);
}
@@ -1394,6 +1395,15 @@ void PrefColors::setResetButtonStatus(bool is_undoing)
}
+void PrefColors::enableEditButtons()
+{
+ if (!lightColorEditPB->isEnabled())
+ lightColorEditPB->setEnabled(true);
+ if (!darkColorEditPB->isEnabled())
+ darkColorEditPB->setEnabled(true);
+}
+
+
void PrefColors::exportTheme()
{
// ask for directory to export
@@ -1827,6 +1837,8 @@ void PrefColors::initializeColorsTV()
darkColorResetPB->setDisabled(true);
bothColorResetPB->setDisabled(true);
colorResetAllPB->setDisabled(true);
+ lightColorEditPB->setDisabled(true);
+ darkColorEditPB->setDisabled(true);
colorsTV->show();
}
diff --git a/src/frontends/qt/GuiPrefs.h b/src/frontends/qt/GuiPrefs.h
index 1ad47afdf4..362da3d550 100644
--- a/src/frontends/qt/GuiPrefs.h
+++ b/src/frontends/qt/GuiPrefs.h
@@ -308,6 +308,8 @@ private:
void setResetButtonStatus(int const &row, bool is_undoing = false);
/// Set availability of reset buttons of the selected row
void setResetButtonStatus(bool is_undoing = false);
+ /// Enable edit buttons
+ void enableEditButtons();
/// Get default color of current theme at (row, column) in the colorsTV.
/// If theme_colors_ is empty, this returns an invalid QColor.
QColor getCurrentThemeColor(int const &row, bool const &is_dark_color);
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs