Commit bc9a77d8 authored by Riccardo Degli Esposti's avatar Riccardo Degli Esposti 🍌 Committed by Tomaz Canabrava
Browse files

Fix transparency not loading in settings

parent 5bac30ab
......@@ -89,7 +89,7 @@ ColorSchemeEditor::ColorSchemeEditor(QWidget *parent)
_ui->wallpaperPath->setClearButtonEnabled(true);
_ui->wallpaperSelectButton->setIcon(QIcon::fromTheme(QStringLiteral("image-x-generic")));
connect(_ui->wallpaperTransparencySlider, &QSlider::valueChanged, this, &Konsole::ColorSchemeEditor::wallpaperOpacityChanged);
connect(_ui->wallpaperTransparencySlider, &QSlider::valueChanged, this, &Konsole::ColorSchemeEditor::setWallpaperOpacity);
connect(_ui->wallpaperSelectButton, &QToolButton::clicked, this, &Konsole::ColorSchemeEditor::selectWallpaper);
connect(_ui->wallpaperPath, &QLineEdit::textChanged, this, &Konsole::ColorSchemeEditor::wallpaperPathChanged);
......@@ -190,7 +190,7 @@ void ColorSchemeEditor::selectWallpaper()
}
}
void ColorSchemeEditor::wallpaperOpacityChanged(int percent)
void ColorSchemeEditor::setWallpaperOpacity(int percent)
{
_ui->wallpaperTransparencyPercentLabel->setText(QStringLiteral("%1%").arg(percent));
......@@ -301,9 +301,12 @@ void ColorSchemeEditor::setup(const std::shared_ptr<const ColorScheme> &scheme,
setupColorTable(_colors);
// setup transparency slider
const int transparencyPercent = qRound((1 - _colors->opacity()) * 100);
_ui->transparencySlider->setValue(transparencyPercent);
setTransparencyPercentLabel(transparencyPercent);
const int colorTransparencyPercent = qRound((1 - _colors->opacity()) * 100);
const int wallpaperTransparencyPercent = qRound((1 - _colors->wallpaper()->opacity()) * 100);
_ui->transparencySlider->setValue(colorTransparencyPercent);
_ui->wallpaperTransparencySlider->setValue(wallpaperTransparencyPercent);
setTransparencyPercentLabel(colorTransparencyPercent);
setWallpaperOpacity(wallpaperTransparencyPercent);
// blur behind window checkbox
_ui->blurCheckBox->setChecked(scheme->blur());
......
......@@ -68,7 +68,7 @@ private Q_SLOTS:
void setBlur(bool blur);
void setRandomizedBackgroundColor(bool randomized);
void editColorItem(QTableWidgetItem *item);
void wallpaperOpacityChanged(int percent);
void setWallpaperOpacity(int percent);
void wallpaperPathChanged(const QString &path);
void scalingTypeChanged(QString style);
void horizontalAnchorChanged(int pos);
......
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