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
PIM
PIM MailCommon
Commits
687d430a
Commit
687d430a
authored
Jul 21, 2020
by
Laurent Montel
😁
Browse files
Allow to hide menu in header view
parent
d0917d84
Pipeline
#27874
passed with stage
in 83 minutes and 23 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
687d430a
cmake_minimum_required
(
VERSION 3.5
)
set
(
PIM_VERSION
"5.15.4
1
"
)
set
(
PIM_VERSION
"5.15.4
2
"
)
project
(
mailcommon VERSION
${
PIM_VERSION
}
)
...
...
src/folder/foldertreeview.cpp
View file @
687d430a
...
...
@@ -116,7 +116,7 @@ void FolderTreeView::readConfig()
{
KConfigGroup
myGroup
(
KernelIf
->
config
(),
"MainFolderView"
);
int
iIconSize
=
myGroup
.
readEntry
(
"IconSize"
,
iconSize
().
width
());
if
(
iIconSize
<
16
||
iIconSize
>
32
)
{
if
(
(
iIconSize
<
16
)
||
(
iIconSize
>
32
)
)
{
iIconSize
=
22
;
}
setIconSize
(
QSize
(
iIconSize
,
iIconSize
));
...
...
src/folder/foldertreewidget.cpp
View file @
687d430a
...
...
@@ -50,6 +50,7 @@
#include
<QLabel>
#include
<QPointer>
#include
<QVBoxLayout>
#include
<QHeaderView>
namespace
MailCommon
{
class
Q_DECL_HIDDEN
FolderTreeWidget
::
FolderTreeWidgetPrivate
...
...
@@ -103,6 +104,9 @@ FolderTreeWidget::FolderTreeWidget(
d
->
filterModel
=
new
Akonadi
::
StatisticsProxyModel
(
this
);
d
->
filterModel
->
setSourceModel
(
KernelIf
->
collectionModel
());
}
if
(
options
&
HideHeaderViewMenu
)
{
d
->
folderTreeView
->
header
()
->
setContextMenuPolicy
(
Qt
::
NoContextMenu
);
}
d
->
readableproxy
=
new
FolderTreeWidgetProxyModel
(
this
,
optReadableProxy
);
d
->
readableproxy
->
setSourceModel
((
options
&
HideStatistics
)
...
...
src/folder/foldertreewidget.h
View file @
687d430a
...
...
@@ -59,7 +59,8 @@ public:
UseDistinctSelectionModel
=
4
,
ShowCollectionStatisticAnimation
=
8
,
DontKeyFilter
=
16
,
HideStatistics
=
32
HideStatistics
=
32
,
HideHeaderViewMenu
=
64
};
Q_DECLARE_FLAGS
(
TreeViewOptions
,
TreeViewOption
)
...
...
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