Verified Commit 68ea7287 authored by Felipe Kinoshita's avatar Felipe Kinoshita 🌎
Browse files

applets/digital-clock: add inverted option to clipboard menu

This commit adds a new option to the "Copy to Clipboard" menu that
shows the date with seconds when "show seconds" is not enabled and
without seconds when "show seconds" is enabled.

BUG: 453111
parent 13c6cb3a
Pipeline #169898 passed with stage
in 5 minutes and 46 seconds
......@@ -71,6 +71,12 @@ void ClipboardMenu::setupMenu(QAction *action)
a = menu->addAction(s);
// the same as the option above but shows the opposite of the "show seconds" setting
// e.g if "show seconds" is enabled it will show the time without seconds and vice-versa
s = m_secondsIncluded ? QLocale().toString(time, QLocale::ShortFormat) : QLocale().toString(time, QLocale::LongFormat);
a = menu->addAction(s);
// e.g 4/28/22
s = QLocale().toString(date, QLocale::ShortFormat);
a = menu->addAction(s);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment