Skip to content

Commit

Permalink
use icons from resource in ui files rather than use setIcon()
Browse files Browse the repository at this point in the history
so the dialogs look closer to reality in QtCreator, also reduce strings
to translate
  • Loading branch information
Jojo-Schmitz committed Jun 20, 2016
1 parent a6eae81 commit cc19cb4
Show file tree
Hide file tree
Showing 64 changed files with 1,296 additions and 380 deletions.
16 changes: 13 additions & 3 deletions fluid/fluid_gui.ui
Expand Up @@ -50,7 +50,11 @@
<string/>
</property>
<property name="text">
<string notr="true" extracomment="gets replaced with arrowUp icon">↑</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="../mscore/musescore.qrc">
<normaloff>:/data/icons/arrow_up.svg</normaloff>:/data/icons/arrow_up.svg</iconset>
</property>
</widget>
</item>
Expand All @@ -69,7 +73,11 @@
<string>Move Soundfont down</string>
</property>
<property name="text">
<string notr="true" extracomment="gets replaced with arrowDown icon">↓</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="../mscore/musescore.qrc">
<normaloff>:/data/icons/arrow_down.svg</normaloff>:/data/icons/arrow_down.svg</iconset>
</property>
</widget>
</item>
Expand Down Expand Up @@ -116,6 +124,8 @@
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../mscore/musescore.qrc"/>
</resources>
<connections/>
</ui>
2 changes: 0 additions & 2 deletions fluid/fluidgui.cpp
Expand Up @@ -85,8 +85,6 @@ FluidGui::FluidGui(Synthesizer* s)
connect(soundFontDelete, SIGNAL(clicked()), SLOT(soundFontDeleteClicked()));
connect(soundFonts, SIGNAL(itemSelectionChanged ()), SLOT(updateUpDownButtons()));
updateUpDownButtons();
soundFontUp->setIcon(*icons[int(Icons::arrowUp_ICON)]);
soundFontDown->setIcon(*icons[int(Icons::arrowDown_ICON)]);
}

//---------------------------------------------------------
Expand Down
4 changes: 4 additions & 0 deletions mscore/aboutbox.ui
Expand Up @@ -132,6 +132,10 @@
<property name="text">
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
<normaloff>:/data/icons/edit-copy.svg</normaloff>:/data/icons/edit-copy.svg</iconset>
</property>
</widget>
</item>
<item>
Expand Down
2 changes: 0 additions & 2 deletions mscore/albummanager.cpp
Expand Up @@ -38,8 +38,6 @@ AlbumManager::AlbumManager(QWidget* parent)
{
setupUi(this);
setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
up->setIcon(*icons[int(Icons::arrowUp_ICON)]);
down->setIcon(*icons[int(Icons::arrowDown_ICON)]);

album = 0;
connect(add, SIGNAL(clicked()), SLOT(addClicked()));
Expand Down
16 changes: 13 additions & 3 deletions mscore/albummanager.ui
Expand Up @@ -85,7 +85,11 @@
<string>Move current score up in list</string>
</property>
<property name="text">
<string notr="true" extracomment="gets replaced with arrowUp Icon">↑</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
<normaloff>:/data/icons/arrow_up.svg</normaloff>:/data/icons/arrow_up.svg</iconset>
</property>
</widget>
</item>
Expand Down Expand Up @@ -114,7 +118,11 @@
<string>Move current score down in list</string>
</property>
<property name="text">
<string notr="true" extracomment="gets replaced with arrowDown Icon">↓</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
<normaloff>:/data/icons/arrow_down.svg</normaloff>:/data/icons/arrow_down.svg</iconset>
</property>
</widget>
</item>
Expand Down Expand Up @@ -248,7 +256,9 @@
<tabstop>checkBoxAddPageBreak</tabstop>
<tabstop>createScore</tabstop>
</tabstops>
<resources/>
<resources>
<include location="musescore.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
Expand Down
16 changes: 13 additions & 3 deletions mscore/debugger/measure.ui
Expand Up @@ -31,14 +31,22 @@
<string notr="true"/>
</property>
<property name="text">
<string notr="true">previous</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="../musescore.qrc">
<normaloff>:/data/icons/go-previous.svg</normaloff>:/data/icons/go-previous.svg</iconset>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="nextButton">
<property name="text">
<string notr="true">next</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="../musescore.qrc">
<normaloff>:/data/icons/go-next.svg</normaloff>:/data/icons/go-next.svg</iconset>
</property>
</widget>
</item>
Expand Down Expand Up @@ -510,6 +518,8 @@
</item>
</layout>
</widget>
<resources/>
<resources>
<include location="../musescore.qrc"/>
</resources>
<connections/>
</ui>
6 changes: 0 additions & 6 deletions mscore/editstaff.cpp
Expand Up @@ -55,12 +55,6 @@ EditStaff::EditStaff(Staff* s, int /*tick*/, QWidget* parent)
setWindowFlags(this->windowFlags() & ~Qt::WindowContextHelpButtonHint);
setModal(true);

const QIcon &editIcon = *icons[int(Icons::edit_ICON)];
minPitchASelect->setIcon(editIcon);
maxPitchASelect->setIcon(editIcon);
minPitchPSelect->setIcon(editIcon);
maxPitchPSelect->setIcon(editIcon);

Part* part = orgStaff->part();
instrument = *part->instrument(/*tick*/);
Score* score = part->score();
Expand Down
28 changes: 23 additions & 5 deletions mscore/editstaff.ui
Expand Up @@ -188,7 +188,11 @@
<item>
<widget class="QToolButton" name="minPitchASelect">
<property name="text">
<string notr="true">...</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
<normaloff>:/data/icons/edit.svg</normaloff>:/data/icons/edit.svg</iconset>
</property>
</widget>
</item>
Expand All @@ -209,7 +213,11 @@
<item>
<widget class="QToolButton" name="maxPitchASelect">
<property name="text">
<string notr="true">...</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
<normaloff>:/data/icons/edit.svg</normaloff>:/data/icons/edit.svg</iconset>
</property>
</widget>
</item>
Expand Down Expand Up @@ -249,7 +257,11 @@
<item>
<widget class="QToolButton" name="minPitchPSelect">
<property name="text">
<string notr="true">...</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
<normaloff>:/data/icons/edit.svg</normaloff>:/data/icons/edit.svg</iconset>
</property>
</widget>
</item>
Expand All @@ -270,7 +282,11 @@
<item>
<widget class="QToolButton" name="maxPitchPSelect">
<property name="text">
<string notr="true">...</string>
<string notr="true"/>
</property>
<property name="icon">
<iconset resource="musescore.qrc">
<normaloff>:/data/icons/edit.svg</normaloff>:/data/icons/edit.svg</iconset>
</property>
</widget>
</item>
Expand Down Expand Up @@ -920,7 +936,9 @@
<tabstop>numOfStrings</tabstop>
<tabstop>editStringData</tabstop>
</tabstops>
<resources/>
<resources>
<include location="musescore.qrc"/>
</resources>
<connections>
<connection>
<sender>buttonBox</sender>
Expand Down
5 changes: 0 additions & 5 deletions mscore/editstyle.cpp
Expand Up @@ -245,9 +245,6 @@ EditStyle::EditStyle(Score* s, QWidget* parent)
};


const QIcon &editIcon = *icons[int(Icons::edit_ICON)];
chordDescriptionFileButton->setIcon(editIcon);

pageList->setCurrentRow(0);

articulationTable->setSelectionBehavior(QAbstractItemView::SelectRows);
Expand Down Expand Up @@ -389,8 +386,6 @@ EditStyle::EditStyle(Score* s, QWidget* parent)
Direction::fillComboBox(cb);
}
if (sw.reset) {
sw.reset->setIcon(*icons[int(Icons::reset_ICON)]);
sw.reset->setToolTip(tr("reset to default"));
connect(sw.reset, SIGNAL(clicked()), mapper, SLOT(map()));
mapper->setMapping(sw.reset, int(sw.idx));
}
Expand Down

0 comments on commit cc19cb4

Please sign in to comment.