Commit fe60f154 authored by Nikita Sirgienko's avatar Nikita Sirgienko

Set proper values for bold/italic font checkbox in CommandEntry

parent d18779aa
......@@ -175,6 +175,7 @@ void CommandEntry::initMenus() {
}
//font
QFont font = m_commandItem->font();
m_fontMenu = new QMenu(i18n("Font"));
m_fontMenu->setIcon(QIcon::fromTheme(QLatin1String("preferences-desktop-font")));
......@@ -182,11 +183,15 @@ void CommandEntry::initMenus() {
action->setCheckable(true);
connect(action, &QAction::triggered, this, &CommandEntry::fontBoldTriggered);
m_fontMenu->addAction(action);
if (font.bold())
action->setChecked(true);
action = new QAction(QIcon::fromTheme(QLatin1String("format-text-italic")), i18n("Italic"));
action->setCheckable(true);
connect(action, &QAction::triggered, this, &CommandEntry::fontItalicTriggered);
m_fontMenu->addAction(action);
if (font.italic())
action->setChecked(true);
m_fontMenu->addSeparator();
action = new QAction(QIcon::fromTheme(QLatin1String("format-font-size-less")), i18n("Increase Size"));
......
Markdown is supported
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