forked from qt-creator/qt-creator
Terminal: Fine-tune tooltips
And add full stops to ends of tooltips and messages. Change-Id: Ieacb17069fc45591089eebb610d4824195adb660 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
@@ -79,10 +79,10 @@ TerminalPane::TerminalPane(QObject *parent)
|
|||||||
.toString(QKeySequence::NativeText);
|
.toString(QKeySequence::NativeText);
|
||||||
if (TerminalSettings::instance().sendEscapeToTerminal.value()) {
|
if (TerminalSettings::instance().sendEscapeToTerminal.value()) {
|
||||||
m_escSettingButton->setText(escKey);
|
m_escSettingButton->setText(escKey);
|
||||||
m_escSettingButton->setToolTip(Tr::tr("Sending Esc to terminal instead of Qt Creator"));
|
m_escSettingButton->setToolTip(Tr::tr("Sends Esc to terminal instead of Qt Creator."));
|
||||||
} else {
|
} else {
|
||||||
m_escSettingButton->setText(shiftEsc);
|
m_escSettingButton->setText(shiftEsc);
|
||||||
m_escSettingButton->setToolTip(Tr::tr("Press %1 to send Esc to terminal").arg(shiftEsc));
|
m_escSettingButton->setToolTip(Tr::tr("Press %1 to send Esc to terminal.").arg(shiftEsc));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -252,10 +252,10 @@ void TerminalPane::initActions()
|
|||||||
TerminalSettings::instance().lockKeyboard.setValue(locked);
|
TerminalSettings::instance().lockKeyboard.setValue(locked);
|
||||||
if (locked) {
|
if (locked) {
|
||||||
lockKeyboard.setIcon(LOCK_KEYBOARD_ICON.icon());
|
lockKeyboard.setIcon(LOCK_KEYBOARD_ICON.icon());
|
||||||
lockKeyboard.setToolTip(Tr::tr("Keyboard shortcuts will be sent to the Terminal"));
|
lockKeyboard.setToolTip(Tr::tr("Sends keyboard shortcuts to Terminal."));
|
||||||
} else {
|
} else {
|
||||||
lockKeyboard.setIcon(UNLOCK_KEYBOARD_ICON.icon());
|
lockKeyboard.setIcon(UNLOCK_KEYBOARD_ICON.icon());
|
||||||
lockKeyboard.setToolTip(Tr::tr("Keyboard shortcuts will be sent to Qt Creator"));
|
lockKeyboard.setToolTip(Tr::tr("Sends keyboard shortcuts to Qt Creator."));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -110,7 +110,7 @@ static expected_str<void> loadItermColors(const FilePath &path)
|
|||||||
QFile f(path.toFSPathString());
|
QFile f(path.toFSPathString());
|
||||||
const bool opened = f.open(QIODevice::ReadOnly);
|
const bool opened = f.open(QIODevice::ReadOnly);
|
||||||
if (!opened)
|
if (!opened)
|
||||||
return make_unexpected(Tr::tr("Failed to open file"));
|
return make_unexpected(Tr::tr("Failed to open file."));
|
||||||
|
|
||||||
QXmlStreamReader reader(&f);
|
QXmlStreamReader reader(&f);
|
||||||
while (!reader.atEnd() && reader.readNextStartElement()) {
|
while (!reader.atEnd() && reader.readNextStartElement()) {
|
||||||
@@ -191,7 +191,7 @@ static expected_str<void> loadVsCodeColors(const FilePath &path)
|
|||||||
const QJsonObject root = doc.object();
|
const QJsonObject root = doc.object();
|
||||||
const auto itColors = root.find("colors");
|
const auto itColors = root.find("colors");
|
||||||
if (itColors == root.end())
|
if (itColors == root.end())
|
||||||
return make_unexpected(Tr::tr("No colors found"));
|
return make_unexpected(Tr::tr("No colors found."));
|
||||||
|
|
||||||
const QJsonObject colors = itColors->toObject();
|
const QJsonObject colors = itColors->toObject();
|
||||||
|
|
||||||
@@ -252,7 +252,7 @@ static expected_str<void> loadKonsoleColorScheme(const FilePath &path)
|
|||||||
|
|
||||||
auto parseColor = [](const QStringList &parts) -> expected_str<QColor> {
|
auto parseColor = [](const QStringList &parts) -> expected_str<QColor> {
|
||||||
if (parts.size() != 3 && parts.size() != 4)
|
if (parts.size() != 3 && parts.size() != 4)
|
||||||
return make_unexpected(Tr::tr("Invalid color format"));
|
return make_unexpected(Tr::tr("Invalid color format."));
|
||||||
int alpha = parts.size() == 4 ? parts[3].toInt() : 255;
|
int alpha = parts.size() == 4 ? parts[3].toInt() : 255;
|
||||||
return QColor(parts[0].toInt(), parts[1].toInt(), parts[2].toInt(), alpha);
|
return QColor(parts[0].toInt(), parts[1].toInt(), parts[2].toInt(), alpha);
|
||||||
};
|
};
|
||||||
@@ -351,7 +351,7 @@ static expected_str<void> loadColorScheme(const FilePath &path)
|
|||||||
else if (path.suffix() == "theme" || path.completeSuffix() == "theme.txt")
|
else if (path.suffix() == "theme" || path.completeSuffix() == "theme.txt")
|
||||||
return loadXFCE4ColorScheme(path);
|
return loadXFCE4ColorScheme(path);
|
||||||
|
|
||||||
return make_unexpected(Tr::tr("Unknown color scheme format"));
|
return make_unexpected(Tr::tr("Unknown color scheme format."));
|
||||||
}
|
}
|
||||||
|
|
||||||
static TerminalSettings *s_instance;
|
static TerminalSettings *s_instance;
|
||||||
@@ -375,7 +375,7 @@ TerminalSettings::TerminalSettings()
|
|||||||
enableTerminal.setSettingsKey("EnableTerminal");
|
enableTerminal.setSettingsKey("EnableTerminal");
|
||||||
enableTerminal.setLabelText(Tr::tr("Use internal terminal"));
|
enableTerminal.setLabelText(Tr::tr("Use internal terminal"));
|
||||||
enableTerminal.setToolTip(
|
enableTerminal.setToolTip(
|
||||||
Tr::tr("If enabled, use the internal terminal when \"Run In Terminal\" is "
|
Tr::tr("Uses the internal terminal when \"Run In Terminal\" is "
|
||||||
"enabled and for \"Open Terminal here\"."));
|
"enabled and for \"Open Terminal here\"."));
|
||||||
enableTerminal.setDefaultValue(true);
|
enableTerminal.setDefaultValue(true);
|
||||||
|
|
||||||
@@ -387,7 +387,7 @@ TerminalSettings::TerminalSettings()
|
|||||||
|
|
||||||
fontSize.setSettingsKey("FontSize");
|
fontSize.setSettingsKey("FontSize");
|
||||||
fontSize.setLabelText(Tr::tr("Size:"));
|
fontSize.setLabelText(Tr::tr("Size:"));
|
||||||
fontSize.setToolTip(Tr::tr("The font size used in the terminal. (in points)"));
|
fontSize.setToolTip(Tr::tr("The font size used in the terminal (in points)."));
|
||||||
fontSize.setDefaultValue(defaultFontSize());
|
fontSize.setDefaultValue(defaultFontSize());
|
||||||
fontSize.setRange(1, 100);
|
fontSize.setRange(1, 100);
|
||||||
|
|
||||||
@@ -414,13 +414,13 @@ TerminalSettings::TerminalSettings()
|
|||||||
sendEscapeToTerminal.setSettingsKey("SendEscapeToTerminal");
|
sendEscapeToTerminal.setSettingsKey("SendEscapeToTerminal");
|
||||||
sendEscapeToTerminal.setLabelText(Tr::tr("Send escape key to terminal"));
|
sendEscapeToTerminal.setLabelText(Tr::tr("Send escape key to terminal"));
|
||||||
sendEscapeToTerminal.setToolTip(
|
sendEscapeToTerminal.setToolTip(
|
||||||
Tr::tr("If enabled, pressing the escape key will send it to the terminal "
|
Tr::tr("Sends the escape key to the terminal when pressed"
|
||||||
"instead of closing the terminal."));
|
"instead of closing the terminal."));
|
||||||
sendEscapeToTerminal.setDefaultValue(false);
|
sendEscapeToTerminal.setDefaultValue(false);
|
||||||
|
|
||||||
audibleBell.setSettingsKey("AudibleBell");
|
audibleBell.setSettingsKey("AudibleBell");
|
||||||
audibleBell.setLabelText(Tr::tr("Audible bell"));
|
audibleBell.setLabelText(Tr::tr("Audible bell"));
|
||||||
audibleBell.setToolTip(Tr::tr("If enabled, the terminal will beep when a bell "
|
audibleBell.setToolTip(Tr::tr("Makes the terminal beep when a bell "
|
||||||
"character is received."));
|
"character is received."));
|
||||||
audibleBell.setDefaultValue(true);
|
audibleBell.setDefaultValue(true);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user