mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-19 11:26:11 +00:00
Set zoom factor when opening appearance settings. (#2003)
This commit is contained in:
parent
830e9cd947
commit
b3776a6b73
@ -28,8 +28,7 @@ AppearanceOptionsWidget::AppearanceOptionsWidget(PreferencesDialog *dialog)
|
||||
ui(new Ui::AppearanceOptionsWidget)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
updateFontFromConfig();
|
||||
updateThemeFromConfig(false);
|
||||
updateFromConfig();
|
||||
|
||||
QStringList langs = Config()->getAvailableTranslations();
|
||||
ui->languageComboBox->addItems(langs);
|
||||
@ -264,6 +263,13 @@ void AppearanceOptionsWidget::updateModificationButtons(const QString& theme)
|
||||
ui->renameButton->setEnabled(editable);
|
||||
}
|
||||
|
||||
void AppearanceOptionsWidget::updateFromConfig()
|
||||
{
|
||||
updateFontFromConfig();
|
||||
updateThemeFromConfig(false);
|
||||
ui->fontZoomBox->setValue(qRound(Config()->getZoomFactor() * 100));
|
||||
}
|
||||
|
||||
QIcon AppearanceOptionsWidget::getIconFromSvg(const QString& fileName, const QColor& after, const QColor& before)
|
||||
{
|
||||
QFile file(fileName);
|
||||
|
@ -54,8 +54,9 @@ private slots:
|
||||
void on_editButton_clicked();
|
||||
void onLanguageComboBoxCurrentIndexChanged(int index);
|
||||
|
||||
private:
|
||||
void updateModificationButtons(const QString& theme);
|
||||
|
||||
void updateFromConfig();
|
||||
|
||||
/**
|
||||
* @brief Changes all @a before colors in given @a fileName svg file to @a after
|
||||
|
Loading…
Reference in New Issue
Block a user