mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-24 05:45:27 +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(new Ui::AppearanceOptionsWidget)
|
||||||
{
|
{
|
||||||
ui->setupUi(this);
|
ui->setupUi(this);
|
||||||
updateFontFromConfig();
|
updateFromConfig();
|
||||||
updateThemeFromConfig(false);
|
|
||||||
|
|
||||||
QStringList langs = Config()->getAvailableTranslations();
|
QStringList langs = Config()->getAvailableTranslations();
|
||||||
ui->languageComboBox->addItems(langs);
|
ui->languageComboBox->addItems(langs);
|
||||||
@ -264,6 +263,13 @@ void AppearanceOptionsWidget::updateModificationButtons(const QString& theme)
|
|||||||
ui->renameButton->setEnabled(editable);
|
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)
|
QIcon AppearanceOptionsWidget::getIconFromSvg(const QString& fileName, const QColor& after, const QColor& before)
|
||||||
{
|
{
|
||||||
QFile file(fileName);
|
QFile file(fileName);
|
||||||
|
@ -54,8 +54,9 @@ private slots:
|
|||||||
void on_editButton_clicked();
|
void on_editButton_clicked();
|
||||||
void onLanguageComboBoxCurrentIndexChanged(int index);
|
void onLanguageComboBoxCurrentIndexChanged(int index);
|
||||||
|
|
||||||
|
private:
|
||||||
void updateModificationButtons(const QString& theme);
|
void updateModificationButtons(const QString& theme);
|
||||||
|
void updateFromConfig();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Changes all @a before colors in given @a fileName svg file to @a after
|
* @brief Changes all @a before colors in given @a fileName svg file to @a after
|
||||||
|
Loading…
Reference in New Issue
Block a user