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
Graphics
Gwenview
Commits
c2e2c2ff
Commit
c2e2c2ff
authored
Dec 12, 2021
by
Nate Graham
Browse files
Reverse "next" and "previous" icons in RTL mode
CCBUG: 440650
parent
79c6bdcf
Pipeline
#108897
failed with stage
in 5 minutes and 46 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
app/mainwindow.cpp
View file @
c2e2c2ff
...
...
@@ -428,14 +428,14 @@ struct MainWindow::Private {
mGoToPreviousAction
=
view
->
addAction
(
"go_previous"
,
q
,
SLOT
(
goToPrevious
()));
mGoToPreviousAction
->
setPriority
(
QAction
::
LowPriority
);
mGoToPreviousAction
->
setIcon
(
QIcon
::
fromTheme
(
"go-previous-view
"
));
mGoToPreviousAction
->
setIcon
(
QIcon
::
fromTheme
(
QGuiApplication
::
layoutDirection
()
==
Qt
::
LeftToRight
?
"go-next"
:
"go-next-symbolic-rtl
"
));
mGoToPreviousAction
->
setText
(
i18nc
(
"@action Go to previous image"
,
"Previous"
));
mGoToPreviousAction
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Go to previous image"
));
installDisabledActionShortcutMonitor
(
mGoToPreviousAction
,
SLOT
(
showFirstDocumentReached
()));
mGoToNextAction
=
view
->
addAction
(
"go_next"
,
q
,
SLOT
(
goToNext
()));
mGoToNextAction
->
setPriority
(
QAction
::
LowPriority
);
mGoToNextAction
->
setIcon
(
QIcon
::
fromTheme
(
"go-next-view
"
));
mGoToNextAction
->
setIcon
(
QIcon
::
fromTheme
(
QGuiApplication
::
layoutDirection
()
==
Qt
::
LeftToRight
?
"go-previous"
:
"go-previous-symbolic-rtl
"
));
mGoToNextAction
->
setText
(
i18nc
(
"@action Go to next image"
,
"Next"
));
mGoToNextAction
->
setToolTip
(
i18nc
(
"@info:tooltip"
,
"Go to next image"
));
installDisabledActionShortcutMonitor
(
mGoToNextAction
,
SLOT
(
showLastDocumentReached
()));
...
...
lib/datewidget.cpp
View file @
c2e2c2ff
...
...
@@ -23,6 +23,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Cambridge, MA 02110-1301, USA
// Qt
#include
<QDate>
#include
<QGuiApplication>
#include
<QHBoxLayout>
#include
<QLocale>
...
...
@@ -80,8 +81,8 @@ DateWidget::DateWidget(QWidget *parent)
d
->
mPreviousButton
=
new
StatusBarToolButton
;
d
->
mPreviousButton
->
setGroupPosition
(
StatusBarToolButton
::
GroupLeft
);
// FIXME: RTL
d
->
mPreviousButton
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"go-previous"
)));
d
->
mPreviousButton
->
setIcon
(
QIcon
::
fromTheme
(
QGuiApplication
::
layoutDirection
()
==
Qt
::
LeftToRight
?
QStringLiteral
(
"go-previous"
)
:
QStringLiteral
(
"go-previous
-symbolic-rtl
"
)));
connect
(
d
->
mPreviousButton
,
&
StatusBarToolButton
::
clicked
,
this
,
&
DateWidget
::
goToPrevious
);
d
->
mDateButton
=
new
StatusBarToolButton
;
...
...
@@ -90,7 +91,8 @@ DateWidget::DateWidget(QWidget *parent)
d
->
mNextButton
=
new
StatusBarToolButton
;
d
->
mNextButton
->
setGroupPosition
(
StatusBarToolButton
::
GroupRight
);
d
->
mNextButton
->
setIcon
(
QIcon
::
fromTheme
(
QStringLiteral
(
"go-next"
)));
d
->
mNextButton
->
setIcon
(
QIcon
::
fromTheme
(
QGuiApplication
::
layoutDirection
()
==
Qt
::
LeftToRight
?
QStringLiteral
(
"go-next"
)
:
QStringLiteral
(
"go-next-symbolic-rtl"
)));
connect
(
d
->
mNextButton
,
&
StatusBarToolButton
::
clicked
,
this
,
&
DateWidget
::
goToNext
);
auto
*
layout
=
new
QHBoxLayout
(
this
);
...
...
Nate Graham
@ngraham
mentioned in commit
ca907411
·
Dec 16, 2021
mentioned in commit
ca907411
mentioned in commit ca907411f5de521433c12ba687549d63444c468c
Toggle commit list
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