Skip to content

Commit

Permalink
fix #195891: score information too big for small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Aug 7, 2017
1 parent 9e275eb commit d017fe6
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 95 deletions.
14 changes: 8 additions & 6 deletions mscore/uploadscoredialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ UploadScoreDialog::UploadScoreDialog(LoginManager* loginManager)
.arg("</a>"));
QFont font = licenseHelp->font();
font.setPointSize(8);
font.setItalic(true);
licenseHelp->setFont(font);

privateHelp->setText(tr("Respect the %1community guidelines%2. Only make your scores accessible to anyone with permission from the right holders.")
Expand All @@ -78,6 +79,7 @@ UploadScoreDialog::UploadScoreDialog(LoginManager* loginManager)

tagsHelp->setText(tr("Use a comma to separate the tags"));
tagsHelp->setFont(font);

uploadAudioHelp->setFont(font);
QString urlHelp = QString("https://musescore.org/redirect/handbook?chapter=upload-score-audio&locale=%1&utm_source=desktop&utm_medium=save-online&utm_content=%2&utm_term=upload-score-audio&utm_campaign=MuseScore%3")
.arg(mscore->getLocaleISOCode())
Expand All @@ -94,7 +96,7 @@ UploadScoreDialog::UploadScoreDialog(LoginManager* loginManager)


connect(buttonBox, SIGNAL(clicked(QAbstractButton*)), SLOT(buttonBoxClicked(QAbstractButton*)));
chkSignoutOnExit->setVisible(false);
chkSignoutOnExit->setVisible(false); // currently unused, so hide it
_loginManager = loginManager;
connect(_loginManager, SIGNAL(uploadSuccess(QString, QString, QString)), this, SLOT(uploadSuccess(QString, QString, QString)));
connect(_loginManager, SIGNAL(uploadError(QString)), this, SLOT(uploadError(QString)));
Expand Down Expand Up @@ -212,12 +214,12 @@ void UploadScoreDialog::display()
if (sl.length() > 0) {
QString nidString = sl.last();
bool ok;
int nid = nidString.toInt(&ok);
int nid = nidString.toInt(&ok);
if (ok) {
_nid = nid;
_loginManager->getScore(nid);
return;
}
_nid = nid;
_loginManager->getScore(nid);
return;
}
}
}
showOrHideUploadAudio();
Expand Down
125 changes: 36 additions & 89 deletions mscore/uploadscoredialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>615</width>
<height>644</height>
<height>535</height>
</rect>
</property>
<property name="windowTitle">
Expand All @@ -16,10 +16,7 @@
<property name="modal">
<bool>true</bool>
</property>
<layout class="QFormLayout" name="formLayout_2">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::FieldsStayAtSizeHint</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="verticalSpacing">
<number>12</number>
</property>
Expand All @@ -44,7 +41,7 @@
</font>
</property>
<property name="text">
<string>USERNAME</string>
<string notr="true" extracomment="Placeholder, gets set programatically">USERNAME</string>
</property>
</widget>
</item>
Expand Down Expand Up @@ -77,14 +74,11 @@
</item>
</layout>
</item>
<item row="1" column="0" colspan="2">
<item row="1" column="0">
<layout class="QVBoxLayout" name="verticalLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="sizeConstraint">
<enum>QLayout::SetMaximumSize</enum>
</property>
<item>
<layout class="QVBoxLayout" name="verticalLayout_2">
<property name="spacing">
Expand All @@ -104,11 +98,7 @@
</widget>
</item>
<item>
<widget class="QLineEdit" name="title">
<property name="text">
<string/>
</property>
</widget>
<widget class="QLineEdit" name="title"/>
</item>
</layout>
</item>
Expand All @@ -126,49 +116,37 @@
</item>
<item>
<widget class="QPlainTextEdit" name="description">
<property name="locale">
<locale language="English" country="UnitedStates"/>
</property>
<property name="plainText">
<string notr="true"/>
<property name="sizeAdjustPolicy">
<enum>QAbstractScrollArea::AdjustToContentsOnFirstShow</enum>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QFormLayout" name="formLayout">
<property name="fieldGrowthPolicy">
<enum>QFormLayout::AllNonFixedFieldsGrow</enum>
</property>
<property name="labelAlignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
<layout class="QGridLayout" name="gridLayout_2">
<property name="horizontalSpacing">
<number>6</number>
</property>
<property name="verticalSpacing">
<number>0</number>
</property>
<item row="0" column="0" colspan="2">
<item row="0" column="0" colspan="3">
<widget class="QCheckBox" name="cbPrivate">
<property name="text">
<string>Make this score private</string>
<string>Keep this score private</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<item row="1" column="0" colspan="3">
<widget class="QLabel" name="privateHelp">
<property name="text">
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
<string notr="true" extracomment="Placeholder, gets set and translated programatically">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Respect the &lt;/span&gt;&lt;a href=&quot;https://musescore.com/community-guidelines&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;community guidelines&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;. Only make your scores accessible to anyone with permission from the right holders.&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
Expand All @@ -177,11 +155,14 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="5" column="0">
<item row="2" column="0" rowspan="2">
<widget class="QLabel" name="label_spacer"/>
</item>
<item row="3" column="1" rowspan="3" colspan="2">
<widget class="QComboBox" name="license"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="lblLicense">
<property name="enabled">
<bool>true</bool>
</property>
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
<horstretch>0</horstretch>
Expand All @@ -199,25 +180,15 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QComboBox" name="license">
<property name="enabled">
<bool>true</bool>
</property>
</widget>
</item>
<item row="6" column="1">
<item row="5" column="2" rowspan="2">
<widget class="QLabel" name="licenseHelp">
<property name="text">
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
<string notr="true" extracomment="Placeholder, gets set and translated programatically">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;a href=&quot;http://redirect.musescore.com/help/license&quot;&gt;&lt;span style=&quot; font-style:italic; text-decoration: underline; color:#0000ff;&quot;&gt;What does this mean?&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="margin">
<number>0</number>
</property>
Expand All @@ -226,14 +197,10 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="7" column="0">
<widget class="QLabel" name="label_spacer_2">
<property name="text">
<string/>
</property>
</widget>
<item row="6" column="0">
<widget class="QLabel" name="label_spacer_2"/>
</item>
<item row="8" column="0">
<item row="7" column="0">
<widget class="QLabel" name="lblTag">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Preferred">
Expand All @@ -250,12 +217,9 @@ p, li { white-space: pre-wrap; }
<property name="text">
<string>Tags:</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="8" column="1">
<item row="7" column="2">
<widget class="QLineEdit" name="tags">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
Expand All @@ -265,43 +229,29 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="9" column="1">
<item row="8" column="0">
<widget class="QLabel" name="label_spacer_3"/>
</item>
<item row="8" column="2">
<widget class="QLabel" name="tagsHelp">
<property name="font">
<font>
<italic>true</italic>
</font>
</property>
<property name="text">
<string notr="true">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
<string notr="true" extracomment="Placeholder, gets set and translated programatically">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8pt; font-weight:400;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Use a comma to separate the tags&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="10" column="0">
<widget class="QLabel" name="label_spacer_3">
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="4" column="0">
<widget class="QLabel" name="label_spacer">
<property name="text">
<string/>
</property>
</widget>
</item>
</layout>
</item>
<item>
<layout class="QFormLayout" name="formLayout_3">
<layout class="QGridLayout" name="gridLayout_3">
<property name="verticalSpacing">
<number>0</number>
</property>
Expand All @@ -312,7 +262,7 @@ p, li { white-space: pre-wrap; }
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<item row="1" column="0">
<widget class="QLabel" name="uploadAudioHelp">
<property name="mouseTracking">
<bool>true</bool>
Expand All @@ -324,9 +274,6 @@ p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:8.25pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-size:8pt;&quot;&gt;Render the score with the current synth settings, and upload it to MuseScore.com. &lt;/span&gt;&lt;a href=&quot;https://musescore.com/community-guidelines&quot;&gt;&lt;span style=&quot; font-size:8pt; text-decoration: underline; color:#0000ff;&quot;&gt;More help.&lt;/span&gt;&lt;/a&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
Expand All @@ -338,18 +285,18 @@ p, li { white-space: pre-wrap; }
</layout>
</item>
<item>
<layout class="QFormLayout" name="formLayout_4">
<layout class="QGridLayout" name="gridLayout_4">
<item row="0" column="0">
<widget class="QCheckBox" name="updateExistingCb">
<property name="text">
<string>Update the existing score </string>
<string>Update existing score</string>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="linkToScore">
<property name="text">
<string notr="true" extracomment="Hyperlink">Link</string>
<string notr="true" extracomment="Hyperlink">[Link]</string>
</property>
<property name="openExternalLinks">
<bool>true</bool>
Expand All @@ -368,7 +315,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item>
<widget class="QTextEdit" name="changes"/>
<widget class="QPlainTextEdit" name="changes"/>
</item>
</layout>
</item>
Expand Down

0 comments on commit d017fe6

Please sign in to comment.