Skip to content

Commit fdb3166

Browse files
authored
Merge pull request #26200 from Eism/muse_score_com_logo_change
fixed #23313: changed musescore.com logo
2 parents 5f097f6 + a17ed09 commit fdb3166

File tree

6 files changed

+17
-21
lines changed

6 files changed

+17
-21
lines changed

src/framework/cloud/audiocom/audiocomservice.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ CloudInfo AudioComService::cloudInfo() const
7373
AUDIOCOM_CLOUD_TITLE,
7474
AUDIOCOM_CLOUD_URL,
7575
AUDIOCOM_LOGO_URL,
76-
logoColorForTheme(uiConfig()->currentTheme())
76+
logoColor()
7777
};
7878
}
7979

src/framework/cloud/internal/abstractcloudservice.cpp

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
#include "multiinstances/resourcelockguard.h"
3434
#include "network/networkerrors.h"
3535
#include "global/iapplication.h"
36+
#include "draw/types/color.h"
3637

3738
#include "oauthhttpserverreplyhandler.h"
3839

@@ -456,10 +457,17 @@ void AbstractCloudService::openUrl(const QUrl& url)
456457
}
457458
}
458459

459-
QString AbstractCloudService::logoColorForTheme(const ui::ThemeInfo& theme) const
460+
QString AbstractCloudService::logoColor() const
460461
{
461-
if (ui::isDarkTheme(theme.codeKey)) {
462-
return "#FFFFFF";
462+
const ui::ThemeList& themens = uiConfig()->themes();
463+
bool isDarkMode = uiConfig()->isDarkMode();
464+
465+
for (const ui::ThemeInfo& theme : themens) {
466+
if ((isDarkMode && theme.codeKey == ui::DARK_THEME_CODE)
467+
|| (!isDarkMode && theme.codeKey == ui::LIGHT_THEME_CODE)) {
468+
return theme.values[ui::FONT_PRIMARY_COLOR].toString();
469+
}
463470
}
464-
return "#000000";
471+
472+
return QString::fromStdString(draw::Color::BLACK.toString());
465473
}

src/framework/cloud/internal/abstractcloudservice.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ private slots:
108108

109109
virtual Ret downloadAccountInfo() = 0;
110110

111-
virtual QString logoColorForTheme(const ui::ThemeInfo& theme) const;
111+
QString logoColor() const;
112112

113113
void setAccountInfo(const AccountInfo& info);
114114

src/framework/cloud/musescorecom/musescorecomservice.cpp

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ static const QUrl MUSESCORECOM_SCORE_DOWNLOAD_SHARED_API_URL(MUSESCORECOM_API_RO
5151
static const QUrl MUSESCORECOM_UPLOAD_SCORE_API_URL(MUSESCORECOM_API_ROOT_URL + "/score/upload");
5252
static const QUrl MUSESCORECOM_UPLOAD_AUDIO_API_URL(MUSESCORECOM_API_ROOT_URL + "/score/audio");
5353

54-
static const QString MUSESCORE_TEXT_LOGO("https://musescore.org/themes/musescore_theme/logo.svg");
54+
static const QString MUSESCORE_TEXT_LOGO("https://musescore.com/static/public/musescore/img/logo/musescore-logo.svg");
5555

5656
static const QString SCORE_ID_KEY("score_id");
5757
static const QString EDITOR_SOURCE_KEY("editor_source");
@@ -75,7 +75,7 @@ CloudInfo MuseScoreComService::cloudInfo() const
7575
MUSESCORECOM_CLOUD_TITLE,
7676
MUSESCORECOM_CLOUD_URL,
7777
MUSESCORE_TEXT_LOGO,
78-
logoColorForTheme(uiConfig()->currentTheme())
78+
logoColor()
7979
};
8080
}
8181

@@ -559,13 +559,3 @@ Ret MuseScoreComService::doUploadAudio(network::INetworkManagerPtr uploadManager
559559

560560
return ret;
561561
}
562-
563-
QString MuseScoreComService::logoColorForTheme(const ui::ThemeInfo& theme) const
564-
{
565-
if (theme.codeKey == ui::LIGHT_THEME_CODE) {
566-
return "#0065C3";
567-
} else if (theme.codeKey == ui::DARK_THEME_CODE) {
568-
return "#8EC9FF";
569-
}
570-
return AbstractCloudService::logoColorForTheme(theme);
571-
}

src/framework/cloud/musescorecom/musescorecomservice.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ class MuseScoreComService : public IMuseScoreComService, public AbstractCloudSer
6969

7070
bool doUpdateTokens() override;
7171

72-
QString logoColorForTheme(const ui::ThemeInfo& theme) const override;
73-
7472
network::RequestHeaders headers() const;
7573

7674
Ret doDownloadScore(network::INetworkManagerPtr downloadManager, int scoreId, QIODevice& scoreData,

src/project/qml/MuseScore/Project/SaveToCloudDialog.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ StyledDialogView {
9090
anchors.left: parent.left
9191

9292
source: contentItem.cloudInfo.cloudLogoUrl
93-
sourceSize.height: 20
93+
sourceSize.height: 26
9494
}
9595

9696
EffectColorOverlay {

0 commit comments

Comments
 (0)