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
digiKam
Commits
c7833dfc
Commit
c7833dfc
authored
Sep 06, 2015
by
Gilles Caulier
🗼
Browse files
backport commit #
ea4241cd
from git/master to frameworks branch
CCBUGS: 261568
parent
5f2bf2fa
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/items/overlays/facerejectionoverlay.cpp
View file @
c7833dfc
...
...
@@ -6,7 +6,7 @@
* Date : 2009-04-30
* Description : selection icon view item at mouse hover
*
* Copyright (C) 2008 by Peter Penz <peter.penz@gmx.at>
* Copyright (C) 2008
by Peter Penz <peter.penz@gmx.at>
* Copyright (C) 2009-2011 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
*
* This program is free software; you can redistribute it
...
...
@@ -39,14 +39,14 @@
namespace
Digikam
{
FaceRejectionOverlayButton
::
FaceRejectionOverlayButton
(
QAbstractItemView
*
parentView
)
FaceRejectionOverlayButton
::
FaceRejectionOverlayButton
(
QAbstractItemView
*
const
parentView
)
:
ItemViewHoverButton
(
parentView
)
{
}
QSize
FaceRejectionOverlayButton
::
sizeHint
()
const
{
return
QSize
(
16
,
16
);
return
QSize
(
32
,
32
);
}
QIcon
FaceRejectionOverlayButton
::
icon
()
...
...
@@ -61,7 +61,7 @@ void FaceRejectionOverlayButton::updateToolTip()
// --------------------------------------------------------------------
FaceRejectionOverlay
::
FaceRejectionOverlay
(
QObject
*
parent
)
FaceRejectionOverlay
::
FaceRejectionOverlay
(
QObject
*
const
parent
)
:
HoverButtonDelegateOverlay
(
parent
)
{
}
...
...
@@ -89,9 +89,11 @@ ItemViewHoverButton* FaceRejectionOverlay::createButton()
void
FaceRejectionOverlay
::
updateButton
(
const
QModelIndex
&
index
)
{
const
QRect
rect
=
m_view
->
visualRect
(
index
);
const
int
size
=
qBound
(
16
,
rect
.
width
()
/
8
-
2
,
48
);
const
int
gap
=
5
;
const
int
x
=
rect
.
right
()
-
button
()
->
sizeHint
().
width
()
-
gap
;
const
int
y
=
rect
.
top
()
+
gap
;
const
int
x
=
rect
.
right
()
-
gap
-
size
;
const
int
y
=
rect
.
top
()
+
gap
;
button
()
->
resize
(
size
,
size
);
button
()
->
move
(
QPoint
(
x
,
y
));
}
...
...
app/items/overlays/facerejectionoverlay.h
View file @
c7833dfc
...
...
@@ -41,7 +41,7 @@ class FaceRejectionOverlayButton : public ItemViewHoverButton
{
public:
explicit
FaceRejectionOverlayButton
(
QAbstractItemView
*
parentView
);
explicit
FaceRejectionOverlayButton
(
QAbstractItemView
*
const
parentView
);
virtual
QSize
sizeHint
()
const
;
protected:
...
...
@@ -58,7 +58,7 @@ class FaceRejectionOverlay : public HoverButtonDelegateOverlay
public:
explicit
FaceRejectionOverlay
(
QObject
*
parent
);
explicit
FaceRejectionOverlay
(
QObject
*
const
parent
);
virtual
void
setActive
(
bool
active
);
Q_SIGNALS:
...
...
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