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
Graphics
KolourPaint
Commits
ae98c7e0
Commit
ae98c7e0
authored
Aug 24, 2021
by
Kai Uwe Broulik
🍇
Browse files
[Rotate Dialog] Use themed rotate (anti)clockwise icons
parent
3a3515b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
dialogs/imagelib/transforms/kpTransformRotateDialog.cpp
View file @
ae98c7e0
...
...
@@ -41,6 +41,7 @@
#include
<QButtonGroup>
#include
<QGroupBox>
#include
<QIcon>
#include
<QLabel>
#include
<QLayout>
#include
<QSpinBox>
...
...
@@ -97,13 +98,28 @@ void kpTransformRotateDialog::createDirectionGroupBox ()
auto
*
directionGroupBox
=
new
QGroupBox
(
i18n
(
"Direction"
),
mainWidget
());
addCustomWidget
(
directionGroupBox
);
QPixmap
antiClockwisePixmap
;
const
QIcon
rotateLeftIcon
=
QIcon
::
fromTheme
(
QStringLiteral
(
"object-rotate-left"
));
// Don't fall back to a generic "object-rotate" or "object"
if
(
rotateLeftIcon
.
isNull
()
||
rotateLeftIcon
.
name
()
!=
QLatin1String
(
"object-rotate-left"
))
{
antiClockwisePixmap
=
QPixmap
(
QStringLiteral
(
":/icons/image_rotate_anticlockwise"
));
}
else
{
antiClockwisePixmap
=
rotateLeftIcon
.
pixmap
(
48
);
}
auto
*
antiClockwisePixmapLabel
=
new
QLabel
(
directionGroupBox
);
antiClockwisePixmapLabel
->
setPixmap
(
QStringLiteral
(
":/icons/image_rotate_anticlockwise"
));
antiClockwisePixmapLabel
->
setPixmap
(
antiClockwisePixmap
);
QPixmap
clockwisePixmap
;
const
QIcon
rotateRightIcon
=
QIcon
::
fromTheme
(
QStringLiteral
(
"object-rotate-right"
));
if
(
rotateRightIcon
.
isNull
()
||
rotateRightIcon
.
name
()
!=
QLatin1String
(
"object-rotate-right"
))
{
clockwisePixmap
=
QPixmap
(
QStringLiteral
(
":/icons/image_rotate_clockwise"
));
}
else
{
clockwisePixmap
=
rotateRightIcon
.
pixmap
(
48
);
}
auto
*
clockwisePixmapLabel
=
new
QLabel
(
directionGroupBox
);
clockwisePixmapLabel
->
setPixmap
(
QStringLiteral
(
":/icons/image_rotate_clockwise"
));
clockwisePixmapLabel
->
setPixmap
(
clockwisePixmap
);
m_antiClockwiseRadioButton
=
new
QRadioButton
(
i18n
(
"Cou&nterclockwise"
),
directionGroupBox
);
m_clockwiseRadioButton
=
new
QRadioButton
(
i18n
(
"C&lockwise"
),
directionGroupBox
);
...
...
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