Skip to content
GitLab
Menu
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
22c6c006
Commit
22c6c006
authored
Nov 16, 2020
by
Piotr Henryk Dabrowski
Browse files
Fix tab color being changed when no user color was selected
parent
881034b3
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/widgets/DetachableTabBar.cpp
View file @
22c6c006
...
...
@@ -158,7 +158,7 @@ void DetachableTabBar::paintEvent(QPaintEvent *event)
}
QColor
varColor
=
data
.
value
<
QColor
>
();
if
(
!
varColor
.
isValid
())
{
if
(
!
varColor
.
isValid
()
||
varColor
.
alpha
()
==
0
)
{
continue
;
}
...
...
src/widgets/RenameTabWidget.cpp
View file @
22c6c006
...
...
@@ -28,10 +28,13 @@ RenameTabWidget::RenameTabWidget(QWidget *parent) :
_ui
->
tabTitleEdit
->
setClearButtonEnabled
(
true
);
_ui
->
remoteTabTitleEdit
->
setClearButtonEnabled
(
true
);
_colorNone
=
palette
().
base
().
color
();
// so that item's text is visible in the combo-box
_colorNone
.
setAlpha
(
0
);
QList
<
QColor
>
listColors
(
_ui
->
tabColorCombo
->
colors
());
listColors
.
insert
(
0
,
QC
olor
(
QColor
::
Invalid
)
);
listColors
.
insert
(
0
,
_c
olor
None
);
_ui
->
tabColorCombo
->
setColors
(
listColors
);
_ui
->
tabColorCombo
->
setItemText
(
1
,
i18n
(
"
Color from them
e"
));
_ui
->
tabColorCombo
->
setItemText
(
1
,
i18n
(
"
Non
e"
));
connect
(
_ui
->
tabTitleEdit
,
&
QLineEdit
::
textChanged
,
this
,
&
Konsole
::
RenameTabWidget
::
tabTitleFormatChanged
);
...
...
@@ -76,7 +79,11 @@ void RenameTabWidget::setRemoteTabTitleText(const QString &text)
void
RenameTabWidget
::
setColor
(
const
QColor
&
color
)
{
_ui
->
tabColorCombo
->
setColor
(
color
);
if
(
!
color
.
isValid
()
||
color
.
alpha
()
==
0
)
{
_ui
->
tabColorCombo
->
setColor
(
_colorNone
);
}
else
{
_ui
->
tabColorCombo
->
setColor
(
color
);
}
}
QString
RenameTabWidget
::
tabTitleText
()
const
...
...
src/widgets/RenameTabWidget.h
View file @
22c6c006
...
...
@@ -46,6 +46,7 @@ public Q_SLOTS:
private:
Ui
::
RenameTabWidget
*
_ui
;
QColor
_colorNone
;
};
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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