Skip to content

Commit 26ff40d

Browse files
committed
added main window transparency on start
1 parent 45f8b70 commit 26ff40d

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
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: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,8 +353,8 @@ 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+
if (MUE_RUN_WINDEPLOYQT)
356357
set(deploy_tool_options_arg "--plugindir bin --qmldir ${PROJECT_SOURCE_DIR}")
357-
358358
qt_generate_deploy_qml_app_script(
359359
TARGET MuseScoreStudio
360360
OUTPUT_SCRIPT deploy_script
@@ -363,6 +363,7 @@ if (OS_IS_WIN)
363363
)
364364

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

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

src/app/internal/guiapp.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,6 @@ void GuiApp::perform()
144144
// ====================================================
145145
// Setup Qml Engine
146146
// ====================================================
147-
//! Needs to be set because we use transparent windows for PopupView.
148-
//! Needs to be called before any QQuickWindows are shown.
149-
QQuickWindow::setDefaultAlphaBuffer(true);
150147

151148
//! NOTE Adjust GS Api
152149
//! We can hide this algorithm in GSApiProvider,
@@ -247,6 +244,13 @@ void GuiApp::perform()
247244
// The main window must be shown at this point so KDDockWidgets can read its size correctly
248245
// and scale all sizes properly. https://github.com/musescore/MuseScore/issues/21148
249246
QQuickWindow* w = dynamic_cast<QQuickWindow*>(obj);
247+
// but before that, let's make the window transparent,
248+
// otherwise the empty window frame will be visible
249+
// https://github.com/musescore/MuseScore/issues/29630
250+
// Transparency will be removed after the page loads.
251+
QQuickWindow::setDefaultAlphaBuffer(true);
252+
w->setOpacity(0.01);
253+
250254
w->setVisible(true);
251255

252256
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)