Skip to content

Commit 143f206

Browse files
Merge pull request #30770 from igorkorsukov/fix/29630_transparent_flashscreen
added main window transparency on start
2 parents eadc271 + 9a648e5 commit 143f206

File tree

4 files changed

+17
-9
lines changed

4 files changed

+17
-9
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ option(MUE_DOWNLOAD_SOUNDFONT "Download the latest soundfont version as part of
104104
# === Pack ===
105105
option(MUE_RUN_LRELEASE "Generate .qm files" ON)
106106
option(MUE_INSTALL_SOUNDFONT "Install sound font" ON)
107+
option(MUE_RUN_WINDEPLOYQT "Run windeployqt" ON)
107108

108109
# === Tests ===
109110
set(MUE_VTEST_MSCORE_REF_BIN "${CMAKE_CURRENT_LIST_DIR}/../MU_ORIGIN/MuseScore/build.debug/install/${INSTALL_SUBDIR}/mscore" CACHE PATH "Path to mscore ref bin")

src/app/CMakeLists.txt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -353,16 +353,17 @@ if (OS_IS_WIN)
353353
configure_file(${PROJECT_SOURCE_DIR}/buildscripts/packaging/Windows/PortableApps/appinfo.ini.in ${CMAKE_INSTALL_PREFIX}/../../App/AppInfo/appinfo.ini @ONLY)
354354
endif (WIN_PORTABLE)
355355

356-
set(deploy_tool_options_arg "--plugindir bin --qmldir ${PROJECT_SOURCE_DIR}")
357-
358-
qt_generate_deploy_qml_app_script(
359-
TARGET MuseScoreStudio
360-
OUTPUT_SCRIPT deploy_script
361-
NO_UNSUPPORTED_PLATFORM_ERROR
362-
DEPLOY_TOOL_OPTIONS ${deploy_tool_options_arg}
363-
)
356+
if (MUE_RUN_WINDEPLOYQT)
357+
set(deploy_tool_options_arg "--plugindir bin --qmldir ${PROJECT_SOURCE_DIR}")
358+
qt_generate_deploy_qml_app_script(
359+
TARGET MuseScoreStudio
360+
OUTPUT_SCRIPT deploy_script
361+
NO_UNSUPPORTED_PLATFORM_ERROR
362+
DEPLOY_TOOL_OPTIONS ${deploy_tool_options_arg}
363+
)
364364

365-
install(SCRIPT ${deploy_script})
365+
install(SCRIPT ${deploy_script})
366+
endif() # MUE_RUN_WINDEPLOYQT
366367

367368
###########################################
368369
# Linux

src/app/internal/guiapp.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,12 @@ void GuiApp::perform()
246246

247247
// The main window must be shown at this point so KDDockWidgets can read its size correctly
248248
// and scale all sizes properly. https://github.com/musescore/MuseScore/issues/21148
249+
// but before that, let's make the window transparent,
250+
// otherwise the empty window frame will be visible
251+
// https://github.com/musescore/MuseScore/issues/29630
252+
// Transparency will be removed after the page loads.
249253
QQuickWindow* w = dynamic_cast<QQuickWindow*>(obj);
254+
w->setOpacity(0.01);
250255
w->setVisible(true);
251256

252257
startupScenario()->runAfterSplashScreen();

src/appshell/qml/WindowContent.qml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ DockWindow {
3939

4040
onPageLoaded: {
4141
interactiveProvider.onPageOpened()
42+
window.opacity = 1.0
4243
}
4344

4445
InteractiveProvider {

0 commit comments

Comments
 (0)