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
d325e7da
Commit
d325e7da
authored
Sep 08, 2015
by
Gilles Caulier
🗼
Browse files
backport commit #
3b82901e
from git/master to frameworks branch
CCBUGS: 261568
parent
62b7ecb1
Changes
5
Hide whitespace changes
Inline
Side-by-side
app/items/digikamimagedelegate.cpp
View file @
d325e7da
...
...
@@ -41,7 +41,7 @@
namespace
Digikam
{
void
DigikamImageDelegatePrivate
::
init
(
DigikamImageDelegate
*
q
,
ImageCategorizedView
*
parent
)
void
DigikamImageDelegatePrivate
::
init
(
DigikamImageDelegate
*
const
q
,
ImageCategorizedView
*
const
parent
)
{
categoryDrawer
=
new
ImageCategoryDrawer
(
parent
);
...
...
@@ -78,18 +78,17 @@ void DigikamImageDelegate::updateRects()
{
Q_D
(
DigikamImageDelegate
);
int
y
=
d
->
margin
;
d
->
pixmapRect
=
QRect
(
d
->
margin
,
y
,
d
->
contentWidth
,
d
->
contentWidth
);
y
=
d
->
pixmapRect
.
bottom
();
d
->
imageInformationRect
=
QRect
(
d
->
margin
,
y
,
d
->
contentWidth
,
0
);
const
ApplicationSettings
*
albumSettings
=
ApplicationSettings
::
instance
();
d
->
drawImageFormat
=
albumSettings
->
getIconShowImageFormat
();
d
->
drawCoordinates
=
ApplicationSettings
::
instance
()
->
getIconShowCoordinates
();
const
int
iconSize
=
22
;
d
->
pickLabelRect
=
QRect
(
d
->
margin
,
y
,
iconSize
,
iconSize
);
d
->
groupRect
=
QRect
(
d
->
contentWidth
-
iconSize
,
y
,
iconSize
,
iconSize
);
d
->
coordinatesRect
=
QRect
(
d
->
contentWidth
-
16
+
2
,
d
->
pixmapRect
.
top
(),
16
,
16
);
int
y
=
d
->
margin
;
d
->
pixmapRect
=
QRect
(
d
->
margin
,
y
,
d
->
contentWidth
,
d
->
contentWidth
);
y
=
d
->
pixmapRect
.
bottom
();
d
->
imageInformationRect
=
QRect
(
d
->
margin
,
y
,
d
->
contentWidth
,
0
);
const
ApplicationSettings
*
const
albumSettings
=
ApplicationSettings
::
instance
();
d
->
drawImageFormat
=
albumSettings
->
getIconShowImageFormat
();
d
->
drawCoordinates
=
ApplicationSettings
::
instance
()
->
getIconShowCoordinates
();
const
int
iconSize
=
qBound
(
16
,
(
d
->
contentWidth
+
2
*
d
->
margin
)
/
8
-
2
,
48
);
d
->
pickLabelRect
=
QRect
(
d
->
margin
,
y
,
iconSize
,
iconSize
);
d
->
groupRect
=
QRect
(
d
->
contentWidth
-
iconSize
,
y
,
iconSize
,
iconSize
);
d
->
coordinatesRect
=
QRect
(
d
->
contentWidth
-
iconSize
+
2
,
d
->
pixmapRect
.
top
(),
iconSize
,
iconSize
);
if
(
albumSettings
->
getIconShowRating
())
{
...
...
app/items/digikamimagedelegatepriv.h
View file @
d325e7da
...
...
@@ -47,7 +47,7 @@ public:
}
virtual
~
DigikamImageDelegatePrivate
();
void
init
(
DigikamImageDelegate
*
q
,
ImageCategorizedView
*
parent
);
void
init
(
DigikamImageDelegate
*
const
q
,
ImageCategorizedView
*
const
parent
);
};
// -----------------------------------------------------------------------------------------
...
...
app/items/imagethumbnaildelegate.cpp
View file @
d325e7da
...
...
@@ -115,8 +115,10 @@ void ImageThumbnailDelegate::updateRects()
Q_D
(
ImageThumbnailDelegate
);
d
->
coordinatesRect
=
QRect
(
d
->
contentWidth
-
16
+
2
,
d
->
pixmapRect
.
top
(),
16
,
16
);
d
->
pixmapRect
=
QRect
(
d
->
margin
,
d
->
margin
,
d
->
contentWidth
,
d
->
contentWidth
);
d
->
rect
=
QRect
(
0
,
0
,
d
->
contentWidth
+
2
*
d
->
margin
,
d
->
contentWidth
+
2
*
d
->
margin
);
d
->
pixmapRect
=
QRect
(
d
->
margin
,
d
->
margin
,
d
->
contentWidth
,
d
->
contentWidth
);
const
int
iconSize
=
qBound
(
16
,
(
d
->
contentWidth
+
2
*
d
->
margin
)
/
8
-
2
,
48
);
d
->
coordinatesRect
=
QRect
(
d
->
contentWidth
-
iconSize
+
2
,
d
->
pixmapRect
.
top
(),
iconSize
,
iconSize
);
d
->
drawImageFormat
=
ApplicationSettings
::
instance
()
->
getIconShowImageFormat
();
d
->
drawCoordinates
=
ApplicationSettings
::
instance
()
->
getIconShowCoordinates
();
...
...
libs/widgets/itemview/itemviewimagedelegate.cpp
View file @
d325e7da
...
...
@@ -92,13 +92,15 @@ void ItemViewImageDelegatePrivate::makeStarPolygon()
}
ItemViewImageDelegate
::
ItemViewImageDelegate
(
QObject
*
const
parent
)
:
DItemDelegate
(
parent
),
d_ptr
(
new
ItemViewImageDelegatePrivate
)
:
DItemDelegate
(
parent
),
d_ptr
(
new
ItemViewImageDelegatePrivate
)
{
d_ptr
->
init
(
this
);
}
ItemViewImageDelegate
::
ItemViewImageDelegate
(
ItemViewImageDelegatePrivate
&
dd
,
QObject
*
const
parent
)
:
DItemDelegate
(
parent
),
d_ptr
(
&
dd
)
:
DItemDelegate
(
parent
),
d_ptr
(
&
dd
)
{
d_ptr
->
init
(
this
);
}
...
...
@@ -489,7 +491,7 @@ void ItemViewImageDelegate::drawPanelSideIcon(QPainter* p, bool left, bool right
{
Q_D
(
const
ItemViewImageDelegate
);
int
iconSize
=
16
;
const
int
iconSize
=
qBound
(
16
,
d
->
rect
.
width
()
/
8
-
2
,
48
)
;
if
(
left
)
{
...
...
utilities/importui/items/importdelegate.cpp
View file @
d325e7da
...
...
@@ -672,7 +672,7 @@ void ImportThumbnailDelegate::updateRects()
d
->
drawImageFormat
=
ImportSettings
::
instance
()
->
getIconShowImageFormat
();
d
->
drawCoordinates
=
ImportSettings
::
instance
()
->
getIconShowCoordinates
();
const
int
iconSize
=
16
;
const
int
iconSize
=
qBound
(
16
,
(
d
->
contentWidth
+
2
*
d
->
margin
)
/
8
-
2
,
48
)
;
int
pos
=
iconSize
+
2
;
d
->
downloadRect
=
QRect
(
d
->
contentWidth
-
pos
,
d
->
pixmapRect
.
top
(),
iconSize
,
iconSize
);
pos
+=
iconSize
;
...
...
@@ -743,7 +743,7 @@ void ImportNormalDelegate::updateRects()
const
ImportSettings
*
const
importSettings
=
ImportSettings
::
instance
();
d
->
drawImageFormat
=
importSettings
->
getIconShowImageFormat
();
d
->
drawCoordinates
=
ImportSettings
::
instance
()
->
getIconShowCoordinates
();
const
int
iconSize
=
16
;
const
int
iconSize
=
qBound
(
16
,
(
d
->
contentWidth
+
2
*
d
->
margin
)
/
8
-
2
,
48
)
;
d
->
pickLabelRect
=
QRect
(
d
->
margin
,
y
,
iconSize
,
iconSize
);
// d->groupRect = QRect(d->contentWidth - iconSize, y, iconSize, iconSize); // TODO
...
...
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