Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Konsole
Commits
bc9a77d8
Commit
bc9a77d8
authored
Dec 17, 2021
by
Riccardo Degli Esposti
🍌
Committed by
Tomaz Canabrava
Dec 29, 2021
Browse files
Fix transparency not loading in settings
parent
5bac30ab
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/colorscheme/ColorSchemeEditor.cpp
View file @
bc9a77d8
...
...
@@ -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
::
w
allpaperOpacity
Changed
);
connect
(
_ui
->
wallpaperTransparencySlider
,
&
QSlider
::
valueChanged
,
this
,
&
Konsole
::
ColorSchemeEditor
::
setW
allpaperOpacity
);
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
::
w
allpaperOpacity
Changed
(
int
percent
)
void
ColorSchemeEditor
::
setW
allpaperOpacity
(
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
());
...
...
src/colorscheme/ColorSchemeEditor.h
View file @
bc9a77d8
...
...
@@ -68,7 +68,7 @@ private Q_SLOTS:
void
setBlur
(
bool
blur
);
void
setRandomizedBackgroundColor
(
bool
randomized
);
void
editColorItem
(
QTableWidgetItem
*
item
);
void
w
allpaperOpacity
Changed
(
int
percent
);
void
setW
allpaperOpacity
(
int
percent
);
void
wallpaperPathChanged
(
const
QString
&
path
);
void
scalingTypeChanged
(
QString
style
);
void
horizontalAnchorChanged
(
int
pos
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment