Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go fullscreen early #3844

Merged
merged 1 commit into from
May 11, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions src/mixxx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,16 @@ void MixxxMainWindow::initialize(QApplication* pApp, const CmdlineArgs& args) {

Sandbox::setPermissionsFilePath(QDir(pConfig->getSettingsPath()).filePath("sandbox.cfg"));

// Turn on fullscreen mode
// if we were told to start in fullscreen mode on the command-line
// or if the user chose to always start in fullscreen mode.
// Remember to refresh the Fullscreen menu item after connectMenuBar()
bool fullscreenPref = pConfig->getValue<bool>(
ConfigKey("[Config]", "StartInFullscreen"));
if (args.getStartInFullscreen() || fullscreenPref) {
showFullScreen();
}

QString resourcePath = pConfig->getResourcePath();

FontUtils::initializeFonts(resourcePath); // takes a long time
Expand Down Expand Up @@ -516,9 +526,10 @@ void MixxxMainWindow::initialize(QApplication* pApp, const CmdlineArgs& args) {

launchProgress(60);

// Connect signals to the menubar. Should be done before we go fullscreen
// and emit newSkinLoaded.
// Connect signals to the menubar. Should be done before emit newSkinLoaded.
connectMenuBar();
// Refresh the Fullscreen checkbox for the case we went fullscreen earlier
emit fullScreenChanged(isFullScreen());

launchProgress(63);

Expand Down Expand Up @@ -570,15 +581,6 @@ void MixxxMainWindow::initialize(QApplication* pApp, const CmdlineArgs& args) {
// This allows us to turn off tooltips.
pApp->installEventFilter(this); // The eventfilter is located in this
// Mixxx class as a callback.

// If we were told to start in fullscreen mode on the command-line or if
// user chose always starts in fullscreen mode, then turn on fullscreen
// mode.
bool fullscreenPref = pConfig->getValue<bool>(
ConfigKey("[Config]", "StartInFullscreen"));
if (args.getStartInFullscreen() || fullscreenPref) {
slotViewFullScreen(true);
}
emit skinLoaded();

m_pMenuBar->show();
Expand Down