refs #304, changed font settings

* QFontDialog is not working, as it is affected by the style sheets itself
* Added font settings to the GUI settings tab
* Added font color dialog for fonts
* Several utility methods
This commit is contained in:
Klaus Basan
2014-08-14 01:28:22 +02:00
parent bbb342b905
commit 98942a6395
10 changed files with 489 additions and 46 deletions

View File

@@ -49,20 +49,8 @@ void MainWindow::ps_onMenuClicked()
}
else if (sender == this->ui->menu_FileFont)
{
// KB: There seems to be a bug with the font Dialog (Win 7/32), it only works once
// Then the font cannot be changed anymore
bool ok = false;
QFont font = QFontDialog::getFont(&ok, this->font(), this, "Application fonts", QFontDialog::ProportionalFonts);
if (ok)
{
// the user clicked OK and font is set to the font the user selected
this->setFont(font);
CStyleSheetUtility::instance().updateFonts(font);
}
else
{
// the user canceled the dialog; font is set to the initial
}
this->ps_setMainPage(MainPageFoo);
this->ui->comp_MainInfoArea->selectSettingsTab(BlackGui::Components::CSettingsComponent::SettingTabGui);
}
else if (sender == this->ui->menu_FileClose)
{