Skip to content

Commit

Permalink
fix #85901: Replace Up/Down buttons by arrows
Browse files Browse the repository at this point in the history
  • Loading branch information
lasconic committed Nov 3, 2015
1 parent e3a4083 commit c95f1c9
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 34 deletions.
17 changes: 13 additions & 4 deletions fluid/fluid_gui.ui
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="soundFontUp">
<widget class="QToolButton" name="soundFontUp">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand All @@ -43,13 +43,19 @@
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Move Soundfont up</string>
</property>
<property name="accessibleDescription">
<string/>
</property>
<property name="text">
<string>Up</string>
<string notr="true">Up</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="soundFontDown">
<widget class="QToolButton" name="soundFontDown">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
Expand All @@ -59,8 +65,11 @@
<property name="focusPolicy">
<enum>Qt::TabFocus</enum>
</property>
<property name="toolTip">
<string>Move Soundfont down</string>
</property>
<property name="text">
<string>Down</string>
<string notr="true">Down</string>
</property>
</widget>
</item>
Expand Down
3 changes: 3 additions & 0 deletions fluid/fluidgui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#include "fluidgui.h"
#include "mscore/preferences.h"
#include "mscore/icons.h"

using namespace Ms;

Expand Down Expand Up @@ -84,6 +85,8 @@ 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
2 changes: 2 additions & 0 deletions mscore/albummanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ 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
69 changes: 47 additions & 22 deletions mscore/albummanager.ui
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,6 @@
</item>
<item>
<layout class="QGridLayout" name="gridLayout">
<item row="4" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="5" column="1">
<widget class="QPushButton" name="add">
<property name="text">
Expand All @@ -70,26 +57,64 @@
</property>
</widget>
</item>
<item row="2" column="0" rowspan="5">
<item row="1" column="0" rowspan="6">
<widget class="QListWidget" name="scoreList"/>
</item>
<item row="3" column="1">
<widget class="QPushButton" name="down">
<item row="4" column="1">
<spacer name="verticalSpacer2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="2" column="1">
<widget class="QToolButton" name="up">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Move current score down in list</string>
<string>Move current score up in list</string>
</property>
<property name="text">
<string>Down</string>
<string notr="true"/>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QPushButton" name="up">
<item row="1" column="1">
<spacer name="verticalSpacer2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QToolButton" name="down">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Move current score up in list</string>
<string>Move current score down in list</string>
</property>
<property name="text">
<string>Up</string>
<string notr="true"/>
</property>
</widget>
</item>
Expand Down
4 changes: 2 additions & 2 deletions mscore/importmidi/importmidi_panel.ui
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="pushButtonUp">
<widget class="QToolButton" name="pushButtonUp">
<property name="minimumSize">
<size>
<width>0</width>
Expand All @@ -130,7 +130,7 @@
</widget>
</item>
<item>
<widget class="QPushButton" name="pushButtonDown">
<widget class="QToolButton" name="pushButtonDown">
<property name="minimumSize">
<size>
<width>0</width>
Expand Down
2 changes: 2 additions & 0 deletions mscore/instrwidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,8 @@ InstrumentsWidget::InstrumentsWidget(QWidget* parent)
: QWidget(parent)
{
setupUi(this);
upButton->setIcon(*icons[int(Icons::arrowUp_ICON)]);
downButton->setIcon(*icons[int(Icons::arrowDown_ICON)]);
splitter->setStretchFactor(0, 10);
splitter->setStretchFactor(1, 0);
splitter->setStretchFactor(2, 15);
Expand Down
14 changes: 10 additions & 4 deletions mscore/instrwidget.ui
Original file line number Diff line number Diff line change
Expand Up @@ -205,34 +205,40 @@
</spacer>
</item>
<item>
<widget class="QPushButton" name="upButton">
<widget class="QToolButton" name="upButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string notr="true"/>
</property>
<property name="accessibleName">
<string>Up</string>
</property>
<property name="text">
<string>Up</string>
<string/>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="downButton">
<widget class="QToolButton" name="downButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string notr="true"/>
</property>
<property name="accessibleName">
<string>Down</string>
</property>
<property name="text">
<string>Down</string>
<string/>
</property>
</widget>
</item>
Expand Down
4 changes: 2 additions & 2 deletions mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4956,6 +4956,8 @@ int main(int argc, char* av[])
else
noSeq = true;

genIcons();

// Do not create sequencer and audio drivers if run with '-s'
if (!noSeq) {
seq = new Seq();
Expand Down Expand Up @@ -5003,8 +5005,6 @@ int main(int argc, char* av[])
// staff has 5 lines = 4 * _spatium
// _spatium = SPATIUM20 * DPI; // 20.0 / 72.0 * DPI / 4.0;

genIcons();

if (!MScore::noGui) {
#ifndef Q_OS_MAC
qApp->setWindowIcon(*icons[int(Icons::window_ICON)]);
Expand Down

0 comments on commit c95f1c9

Please sign in to comment.