commit ac8e1963a1f46b289be6754fc1cc9931d5afb8e6
Author: Koji Yokota <[email protected]>
Date: Tue Jun 17 23:52:07 2025 +0900
Rearranging the math text menu
---
lib/Makefile.am | 1 +
lib/images/math/textnormal.svgz | Bin 0 -> 1077 bytes
lib/ui/stdtoolbars.inc | 5 ++---
src/frontends/qt/GuiToolbar.cpp | 3 ++-
src/frontends/qt/GuiToolbar.h | 18 ++++++++++--------
5 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/lib/Makefile.am b/lib/Makefile.am
index be09569c40..5adbf3428c 100644
--- a/lib/Makefile.am
+++ b/lib/Makefile.am
@@ -1488,6 +1488,7 @@ dist_imagesmath_DATA = \
images/math/tau.svgz \
images/math/taurus.svgz \
images/math/text.svgz \
+ images/math/textnormal.svgz \
images/math/textrm_AA.svgz \
images/math/textrm_O.svgz \
images/math/therefore.svgz \
diff --git a/lib/images/math/textnormal.svgz b/lib/images/math/textnormal.svgz
new file mode 100644
index 0000000000..1c7b4e2934
Binary files /dev/null and b/lib/images/math/textnormal.svgz differ
diff --git a/lib/ui/stdtoolbars.inc b/lib/ui/stdtoolbars.inc
index 1f26c8c8bc..ecee7fcbd5 100644
--- a/lib/ui/stdtoolbars.inc
+++ b/lib/ui/stdtoolbars.inc
@@ -218,10 +218,10 @@ ToolbarSet
Toolbar "math_panels" "Math Panels"
PopupMenu "space" "Math spacings"
PopupMenu "style" "Styles & classes"
- DynamicMenu "dynamic-math-texts" "Text"
PopupMenu "frac-square" "Fractions"
- PopupMenu "font" "Fonts"
PopupMenu "functions" "Functions"
+ PopupMenu "font" "Fonts"
+ DynamicMenu "dynamic-math-texts" "Text"
IconPalette "latex_deco" "Frame decorations"
IconPalette "latex_varsz" "Big operators"
IconPalette "latex_misc" "Miscellaneous"
@@ -455,7 +455,6 @@ ToolbarSet
Item "Fraktur \\mathfrak" "math-insert \mathfrak"
Item "Calligraphic \\mathcal" "math-insert \mathcal"
Item "Formal Script \\mathscr" "math-insert \mathscr"
- Item "Normal text mode \\textrm" "math-insert \textrm"
End
Toolbar "latex_dots" "Dots"
diff --git a/src/frontends/qt/GuiToolbar.cpp b/src/frontends/qt/GuiToolbar.cpp
index 7e9a03885a..a43d97447a 100644
--- a/src/frontends/qt/GuiToolbar.cpp
+++ b/src/frontends/qt/GuiToolbar.cpp
@@ -560,9 +560,10 @@ void DynamicMenuButton::loadMathTexts(InsetMathHull * hull)
FuncRequest::TOOLBAR);
QString menuText = toqstr(from_utf8(mathTextMenu[i][1]
+ "\t\\" +
mathTextMenu[i][0]));
+ QString tooltip = toqstr(from_utf8(mathTextMenu[i][2]));
Action * act =
new Action(func, getIcon(func, false),
- menuText, menuText, this);
+ menuText, tooltip, this);
m->addAction(act);
} else {
skippedMenu = false;
diff --git a/src/frontends/qt/GuiToolbar.h b/src/frontends/qt/GuiToolbar.h
index 487d5a112f..cd2db3fd5b 100644
--- a/src/frontends/qt/GuiToolbar.h
+++ b/src/frontends/qt/GuiToolbar.h
@@ -120,17 +120,19 @@ private:
/// Size of the menu items of math texts
// Make this number sync with the row number of mathTextMenu
- int const mathTextMenuSize_ = 6;
+ int const mathTextMenuSize_ = 8;
/// Dynamic menu items of math texts
// As of June 2025, only applicable to "Text" toolbar menu
- std::string mathTextMenu[6][2] =
+ std::string mathTextMenu[8][3] =
{
- {"mbox", "LR Text"},
- {"fbox", "Framed Text"},
- {"framebox", "Framed Text with sizes"},
- {"text", "AMS Text"},
- {"intertext", "Intertext"},
- {"shortintertext", "Short intertext"}
+ {"mbox", "LR Text", "Text in current font
with constant sizes"},
+ {"fbox", "Framed Text", "Framed text"},
+ {"framebox", "Framed Text with sizes", "Framed text with
variable frame sizes"},
+ {"text", "AMS Text", "Text in current font
with variable sizes"},
+ {"textrm", "Roman text", "Text in roman font"},
+ {"textnormal", "Normal font text", "Text using
\\normalfont"},
+ {"intertext", "Intertext", "Text between
equations"},
+ {"shortintertext", "Short intertext", "Text between equations
of short height"}
};
};
--
lyx-cvs mailing list
[email protected]
https://lists.lyx.org/mailman/listinfo/lyx-cvs