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
Games
KTuberling
Commits
cd78e2a1
Commit
cd78e2a1
authored
Jul 23, 2022
by
Nicolas Fella
Browse files
Port away from QDesktopWidget
parent
0ba2b10e
Pipeline
#208068
passed with stage
in 7 minutes and 45 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
main_mobile.cpp
View file @
cd78e2a1
...
...
@@ -10,10 +10,10 @@
#include
<QApplication>
#include
"ktuberling_debug.h"
#include
<QDesktopWidget>
#include
<QHBoxLayout>
#include
<QLabel>
#include
<QPushButton>
#include
<QScreen>
#include
"filefactory.h"
#include
"soundfactory.h"
...
...
@@ -31,7 +31,6 @@ public:
QWidget
*
mainWidget
=
new
QWidget
();
QHBoxLayout
*
lay
=
new
QHBoxLayout
(
mainWidget
);
m_themesWidget
=
new
QWidget
();
m_gameboardLayout
=
new
QGridLayout
(
m_themesWidget
);
...
...
@@ -44,7 +43,7 @@ public:
QVBoxLayout
*
sideLayout
=
new
QVBoxLayout
();
// Not sure this is the best way but it works for now
const
int
screenWidth
=
QApplication
::
desktop
()
->
screenGeometry
(
mainWidget
).
width
();
const
int
screenWidth
=
QApplication
::
primaryScreen
()
->
geometry
(
).
width
();
const
int
iconWidth
=
screenWidth
/
15
;
QPushButton
*
themesButton
=
new
QPushButton
(
mainWidget
);
...
...
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