mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-09 18:31:04 +00:00
Add some more hints to empty margin widgets (#11424)
This commit is contained in:
parent
8ec16f4020
commit
a4e6f0dead
@ -2079,6 +2079,30 @@ void GuiDocument::setMargins()
|
||||
marginsModule->marginCB->setChecked(!bp_.use_geometry);
|
||||
setCustomMargins(!bp_.use_geometry);
|
||||
}
|
||||
|
||||
// set some placeholder text that hint on defaults
|
||||
QString const placeholder = marginsModule->marginCB->isChecked() ?
|
||||
qt_("Class defaults") : qt_("Package defaults");
|
||||
// set tooltip depending on gemoetry state
|
||||
QString const tooltip = marginsModule->marginCB->isChecked() ?
|
||||
qt_("If no value is given, the defaults as set by the class are used.")
|
||||
: qt_("If no value is given, the defaults as set by the geometry package or a package/class overriding geometry's defaults are used.");
|
||||
marginsModule->topLE->setPlaceholderText(placeholder);
|
||||
marginsModule->bottomLE->setPlaceholderText(placeholder);
|
||||
marginsModule->innerLE->setPlaceholderText(placeholder);
|
||||
marginsModule->outerLE->setPlaceholderText(placeholder);
|
||||
marginsModule->headheightLE->setPlaceholderText(placeholder);
|
||||
marginsModule->headsepLE->setPlaceholderText(placeholder);
|
||||
marginsModule->footskipLE->setPlaceholderText(placeholder);
|
||||
marginsModule->columnsepLE->setPlaceholderText(placeholder);
|
||||
marginsModule->topLE->setToolTip(tooltip);
|
||||
marginsModule->bottomLE->setToolTip(tooltip);
|
||||
marginsModule->innerLE->setToolTip(tooltip);
|
||||
marginsModule->outerLE->setToolTip(tooltip);
|
||||
marginsModule->headheightLE->setToolTip(tooltip);
|
||||
marginsModule->headsepLE->setToolTip(tooltip);
|
||||
marginsModule->footskipLE->setToolTip(tooltip);
|
||||
marginsModule->columnsepLE->setToolTip(tooltip);
|
||||
}
|
||||
|
||||
|
||||
@ -2141,6 +2165,31 @@ void GuiDocument::setCustomMargins(bool custom)
|
||||
marginsModule->columnsepL->setEnabled(enableColSep);
|
||||
marginsModule->columnsepLE->setEnabled(enableColSep);
|
||||
marginsModule->columnsepUnit->setEnabled(enableColSep);
|
||||
|
||||
// set some placeholder text that hint on defaults
|
||||
QString const placeholder = marginsModule->marginCB->isChecked() ?
|
||||
qt_("Class defaults") : qt_("Package defaults");
|
||||
// set tooltip depending on gemoetry state
|
||||
QString const tooltip = marginsModule->marginCB->isChecked() ?
|
||||
qt_("If no value is given, the defaults as set by the class are used.")
|
||||
: qt_("If no value is given, the defaults as set by the geometry package or a package/class overriding geometry's defaults are used.");
|
||||
marginsModule->topLE->setPlaceholderText(placeholder);
|
||||
marginsModule->bottomLE->setPlaceholderText(placeholder);
|
||||
marginsModule->innerLE->setPlaceholderText(placeholder);
|
||||
marginsModule->outerLE->setPlaceholderText(placeholder);
|
||||
marginsModule->headheightLE->setPlaceholderText(placeholder);
|
||||
marginsModule->headsepLE->setPlaceholderText(placeholder);
|
||||
marginsModule->footskipLE->setPlaceholderText(placeholder);
|
||||
marginsModule->columnsepLE->setPlaceholderText(placeholder);
|
||||
marginsModule->topLE->setToolTip(tooltip);
|
||||
marginsModule->bottomLE->setToolTip(tooltip);
|
||||
marginsModule->innerLE->setToolTip(tooltip);
|
||||
marginsModule->outerLE->setToolTip(tooltip);
|
||||
marginsModule->headheightLE->setToolTip(tooltip);
|
||||
marginsModule->headsepLE->setToolTip(tooltip);
|
||||
marginsModule->footskipLE->setToolTip(tooltip);
|
||||
marginsModule->columnsepLE->setToolTip(tooltip);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -36,7 +36,7 @@
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Use the margin settings provided by the document class.
|
||||
Note that if this is unchecked, leaving a field empty may use different defaults values (determined either by the geometry package or by classes/packages overriding geometry's defaults).</string>
|
||||
Note that if this is unchecked, different defaults may be used.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>&Default margins</string>
|
||||
|
Loading…
Reference in New Issue
Block a user