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
Kate
Commits
4da4a154
Commit
4da4a154
authored
Jan 17, 2021
by
Dominik Haumann
Committed by
Jan Paul Batrina
Jan 19, 2021
Browse files
Translate title of color picker dialog
parent
b536dcb6
Changes
1
Hide whitespace changes
Inline
Side-by-side
addons/colorpicker/katecolorpickerplugin.cpp
View file @
4da4a154
...
...
@@ -17,6 +17,7 @@
#include <KTextEditor/MainWindow>
#include <KTextEditor/View>
#include <KConfigGroup>
#include <KLocalizedString>
#include <KPluginFactory>
#include <KSharedConfig>
...
...
@@ -228,10 +229,10 @@ void ColorPickerInlineNoteProvider::inlineNoteActivated(const KTextEditor::Inlin
const
auto
oldColor
=
QColor
(
m_doc
->
text
({
line
,
colorStart
,
line
,
colorEnd
}));
QColorDialog
::
ColorDialogOptions
dialogOptions
=
QColorDialog
::
ShowAlphaChannel
;
QString
title
=
QLatin1String
(
"Select Color (Hex output)"
);
QString
title
=
i18n
(
"Select Color (Hex output)"
);
if
(
!
m_doc
->
isReadWrite
())
{
dialogOptions
|=
QColorDialog
::
NoButtons
;
title
=
QLatin1String
(
"View Color [Read only]"
);
title
=
i18n
(
"View Color [Read only]"
);
}
const
auto
newColor
=
QColorDialog
::
getColor
(
oldColor
,
const_cast
<
KTextEditor
::
View
*>
(
note
.
view
()),
title
,
dialogOptions
);
if
(
!
newColor
.
isValid
())
{
...
...
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