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
PIM
Kleopatra
Commits
5fac52d4
Verified
Commit
5fac52d4
authored
Nov 02, 2022
by
Ingo Klöcker
Committed by
Ingo Klöcker
Nov 02, 2022
Browse files
Indicate keyboard focus for Advanced toggle button on Windows
For details see comments in code. GnuPG-bug-id: 6149
parent
e43a8c0f
Pipeline
#259799
passed with stage
in 5 minutes and 9 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/dialogs/certifywidget.cpp
View file @
5fac52d4
...
...
@@ -79,7 +79,15 @@ private:
AnimatedExpander
::
AnimatedExpander
(
const
QString
&
title
,
const
QString
&
accessibleTitle
,
QWidget
*
parent
)
:
QWidget
{
parent
}
{
#ifdef Q_OS_WIN
// draw dotted focus frame if button has focus; otherwise, draw invisible frame using background color
toggleButton
.
setStyleSheet
(
QStringLiteral
(
"QToolButton { border: 1px solid palette(window); }"
"QToolButton:focus { border: 1px dotted palette(window-text); }"
));
#else
// this works with Breeze style because Breeze draws the focus frame when drawing CE_ToolButtonLabel
// while the Windows styles (and Qt's common base style) draw the focus frame before drawing CE_ToolButtonLabel
toggleButton
.
setStyleSheet
(
QStringLiteral
(
"QToolButton { border: none; }"
));
#endif
toggleButton
.
setToolButtonStyle
(
Qt
::
ToolButtonTextBesideIcon
);
toggleButton
.
setArrowType
(
Qt
::
ArrowType
::
RightArrow
);
toggleButton
.
setText
(
title
);
...
...
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