Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Tobias Hunger
qt-creator
Commits
ef1311d0
Commit
ef1311d0
authored
15 years ago
by
Thorbjørn Lindeijer
Browse files
Options
Downloads
Patches
Plain Diff
Fixed restoring of full screen window state
Task-number: 247123
parent
3c7b1f4a
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/coreplugin/mainwindow.cpp
+15
-6
15 additions, 6 deletions
src/plugins/coreplugin/mainwindow.cpp
with
15 additions
and
6 deletions
src/plugins/coreplugin/mainwindow.cpp
+
15
−
6
View file @
ef1311d0
...
...
@@ -1070,11 +1070,14 @@ static const char *settingsGroup = "MainWindow";
static
const
char
*
geometryKey
=
"Geometry"
;
static
const
char
*
colorKey
=
"Color"
;
static
const
char
*
maxKey
=
"Maximized"
;
static
const
char
*
fullScreenKey
=
"FullScreen"
;
void
MainWindow
::
readSettings
()
{
m_settings
->
beginGroup
(
QLatin1String
(
settingsGroup
));
StyleHelper
::
setBaseColor
(
m_settings
->
value
(
QLatin1String
(
colorKey
)).
value
<
QColor
>
());
const
QVariant
geom
=
m_settings
->
value
(
QLatin1String
(
geometryKey
));
if
(
geom
.
isValid
())
{
setGeometry
(
geom
.
toRect
());
...
...
@@ -1083,8 +1086,10 @@ void MainWindow::readSettings()
}
if
(
m_settings
->
value
(
QLatin1String
(
maxKey
),
false
).
toBool
())
setWindowState
(
Qt
::
WindowMaximized
);
setFullScreen
(
m_settings
->
value
(
QLatin1String
(
fullScreenKey
),
false
).
toBool
());
m_settings
->
endGroup
();
m_editorManager
->
readSettings
(
m_settings
);
m_navigationWidget
->
restoreSettings
(
m_settings
);
m_rightPaneWidget
->
readSettings
(
m_settings
);
...
...
@@ -1093,14 +1098,18 @@ void MainWindow::readSettings()
void
MainWindow
::
writeSettings
()
{
m_settings
->
beginGroup
(
QLatin1String
(
settingsGroup
));
m_settings
->
setValue
(
colorKey
,
StyleHelper
::
baseColor
());
const
QString
maxSettingsKey
=
QLatin1String
(
maxKey
);
if
(
windowState
()
&
Qt
::
WindowMaximized
)
{
m_settings
->
setValue
(
maxSettingsKey
,
true
);
m_settings
->
setValue
(
QLatin1String
(
colorKey
),
StyleHelper
::
baseColor
());
if
(
windowState
()
&
(
Qt
::
WindowMaximized
|
Qt
::
WindowFullScreen
))
{
m_settings
->
setValue
(
QLatin1String
(
maxKey
),
(
bool
)
(
windowState
()
&
Qt
::
WindowMaximized
));
m_settings
->
setValue
(
QLatin1String
(
fullScreenKey
),
(
bool
)
(
windowState
()
&
Qt
::
WindowFullScreen
));
}
else
{
m_settings
->
setValue
(
maxSettingsKey
,
false
);
m_settings
->
setValue
(
QLatin1String
(
maxKey
),
false
);
m_settings
->
setValue
(
QLatin1String
(
fullScreenKey
),
false
);
m_settings
->
setValue
(
QLatin1String
(
geometryKey
),
geometry
());
}
m_settings
->
endGroup
();
m_fileManager
->
saveRecentFiles
();
...
...
@@ -1209,7 +1218,7 @@ QPrinter *MainWindow::printer() const
{
if
(
!
m_printer
)
m_printer
=
new
QPrinter
(
QPrinter
::
HighResolution
);
return
m_printer
;
return
m_printer
;
}
void
MainWindow
::
setFullScreen
(
bool
on
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment