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
PIM IncidenceEditor
Commits
fd6d1689
Commit
fd6d1689
authored
Sep 28, 2022
by
Laurent Montel
Browse files
Fix dialog size
parent
3c7fab23
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/incidencedialog.cpp
View file @
fd6d1689
...
...
@@ -42,11 +42,13 @@
#include
<KMessageBox>
#include
<KSharedConfig>
#include
<KWindowConfig>
#include
<QCloseEvent>
#include
<QDir>
#include
<QIcon>
#include
<QStandardPaths>
#include
<QTimeZone>
#include
<QWindow>
using
namespace
IncidenceEditorNG
;
...
...
@@ -703,18 +705,16 @@ IncidenceDialog::~IncidenceDialog()
void
IncidenceDialog
::
writeConfig
()
{
KConfigGroup
group
(
KSharedConfig
::
openStateConfig
(),
"IncidenceDialog"
);
group
.
writeEntry
(
"Size"
,
size
()
);
KWindowConfig
::
saveWindowSize
(
windowHandle
(),
group
);
}
void
IncidenceDialog
::
readConfig
()
{
create
();
// ensure a window is created
windowHandle
()
->
resize
(
QSize
(
500
,
500
));
KConfigGroup
group
(
KSharedConfig
::
openStateConfig
(),
"IncidenceDialog"
);
const
QSize
size
=
group
.
readEntry
(
"Size"
,
QSize
());
if
(
size
.
isValid
())
{
resize
(
size
);
}
else
{
resize
(
QSize
(
500
,
500
).
expandedTo
(
minimumSizeHint
()));
}
KWindowConfig
::
restoreWindowSize
(
windowHandle
(),
group
);
resize
(
windowHandle
()
->
size
());
// workaround for QTBUG-40584
}
void
IncidenceDialog
::
load
(
const
Akonadi
::
Item
&
item
,
const
QDate
&
activeDate
)
...
...
src/resourcemanagement.cpp
View file @
fd6d1689
...
...
@@ -22,11 +22,13 @@
#include
<KLocalizedString>
#include
<KSharedConfig>
#include
<KWindowConfig>
#include
<QColor>
#include
<QDialogButtonBox>
#include
<QLabel>
#include
<QPushButton>
#include
<QStringList>
#include
<QWindow>
using
namespace
IncidenceEditorNG
;
...
...
@@ -148,17 +150,17 @@ ResourceManagement::~ResourceManagement()
void
ResourceManagement
::
readConfig
()
{
create
();
// ensure a window is created
windowHandle
()
->
resize
(
QSize
(
600
,
400
));
KConfigGroup
group
(
KSharedConfig
::
openStateConfig
(),
"ResourceManagement"
);
const
QSize
size
=
group
.
readEntry
(
"Size"
,
QSize
(
600
,
400
));
if
(
size
.
isValid
())
{
resize
(
size
);
}
KWindowConfig
::
restoreWindowSize
(
windowHandle
(),
group
);
resize
(
windowHandle
()
->
size
());
// workaround for QTBUG-40584
}
void
ResourceManagement
::
writeConfig
()
{
KConfigGroup
group
(
KSharedConfig
::
openStateConfig
(),
"ResourceManagement"
);
group
.
writeEntry
(
"Size"
,
size
()
);
KWindowConfig
::
saveWindowSize
(
windowHandle
(),
group
);
group
.
sync
();
}
...
...
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